DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41938>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41938

           Summary: LogFilePatternReceiver uses greedy matching in logFormat
           Product: Log4j
           Version: 1.2
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: chainsaw
        AssignedTo: [email protected]
        ReportedBy: [EMAIL PROTECTED]


The log format pattern matching for the LogFilePatternReceiver uses a greedy
match algorithm in order to parse the logs. This means that it is unable to read
logs that use multiple bracket separators ("[]") in the log statements.

In the example provided (see the attached ZIP file):

19:11:14,304 DEBUG [AWT-EventQueue-1][admin1-ezhan0qo-5][EventIdGenerator] Id
generated: admin1-ezhan0qo-6, for user:admin1

The logFormat pattern "TIMESTAMP LEVEL [THREAD] [METHOD] [CLASS] MESSAGE" fails.
The reduced configuration "TIMESTAMP LEVEL [THREAD] MESSAGE" succeeds. However,
the THREAD appears as "AWT-EventQueue-1][admin1-ezhan0qo-5][EventIdGenerator"
rather than "AWT-EventQueue-1" (see screenshot in attachment). In both cases, it
appears that this is because the logFormat parser is using a greedy algorithm to
find the ending "]" character.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to