You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by bu...@apache.org on 2007/03/23 15:36:32 UTC
DO NOT REPLY [Bug 41938] New: - LogFilePatternReceiver uses greedy matching in logFormat
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: log4j-dev@logging.apache.org
ReportedBy: timothy.high@sknt.com
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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org
DO NOT REPLY [Bug 41938] - LogFilePatternReceiver uses greedy matching in logFormat
Posted by bu...@apache.org.
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
------- Additional Comments From timothy.high@sknt.com 2007-03-23 07:37 -------
Created an attachment (id=19780)
--> (http://issues.apache.org/bugzilla/attachment.cgi?id=19780&action=view)
Log files, Chainsaw configuration and screenshot
--
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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org
DO NOT REPLY [Bug 41938] - LogFilePatternReceiver uses greedy matching in logFormat
Posted by bu...@apache.org.
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
timothy.high@sknt.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WORKSFORME
------- Additional Comments From timothy.high@sknt.com 2007-05-21 13:56 -------
Yep, you're right! I somehow missed the lack of spacing (and jumped straight to
the most complicated conclusion). Thanks!
--
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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org
DO NOT REPLY [Bug 41938] - LogFilePatternReceiver uses greedy matching in logFormat
Posted by bu...@apache.org.
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
sdeboy@iname.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |CLOSED
--
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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org
DO NOT REPLY [Bug 41938] - LogFilePatternReceiver uses greedy matching in logFormat
Posted by bu...@apache.org.
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
------- Additional Comments From sdeboy@iname.com 2007-03-23 23:23 -------
It's not a problem the greedy matching of brackets - you don't have the right
logFormat.
I took the spaces out between thread/method/class in the logFormat (because your
client.log file doesn't contain spaces between those items) and it worked fine.
Here's the logFormat I used:
TIMESTAMP LEVEL [THREAD][METHOD][CLASS] MESSAGE
If this addresses your issue, please close it.
Thanks
--
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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org