Hi Jan, Hong,
>> Could you review my patch (attached to issue 7976)?
>> https://glassfish.dev.java.net/issues/show_bug.cgi?id=7976
>
> Looks great!! Thanks for this patch!
I'm doing something else at the moment, but I'll commit it this or early
next week then.
>> If the url-pattern is aligned as follows, the resulting message will be:
>> <url-pattern>
>> /TPS
>> </url-pattern>
>>
>> [#|2009-04-24T14:18:33.765+1000|WARNING|glassfish|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=19;_ThreadName=Thread-1;
>>
>> /TPS
>> ;|"DPL8023: URL Pattern contains CR(#xD) or LF(#xA): [
>> /TPS
>> ]. Leading and trailing whitespace will be ignored."|#]
>>
>> The only ugly bit about it is that the thread name(?) seems to include
>> the url pattern too. It would be nicer if it would use the trimmed
>> name, but I'm not sure where it gets set and how to chance it.
>>
>> Any suggestions?
>
> Not sure. The thread name seems to be equal to "Thread-1" in your
> example, and the remainder
> of the line seems to be the warning message you wanted logged. I don't
> see anything wrong with
> that.
I thought '|' is used as separator between thread name and message.
As you can see from the message file, my message is defined as:
enterprise.deployment.backend.urlcontainscrlf="DPL8023: URL Pattern
contains CR(#xD) or LF(#xA): [{0}]. Leading and trailing whitespace will
be ignored."
I'm including the offending url pattern once but in the example above it
is logged twice.
If url-patterns are logged in the thread name for each message related
to the filter or servlet using this pattern, as it looks ugly, I'd like
to make sure that value is trimmed too.
Regards,
Dies