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=43075>.
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=43075
Summary: LogFilePatternReceiver generates a NullPointerException
if there is no Level in your log entry:
Product: Log4j
Version: 1.3alpha
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: chainsaw
AssignedTo: log4j-dev@logging.apache.org
ReportedBy: e011524@aoins.com
The lines of code in question are in
org.apache.log4j.varia.LogFilePatternReceiver.convertToEvent:
level = (String) fieldMap.remove(LEVEL);
Level levelImpl = Level.toLevel(level.trim());
If there is no Level in the log entry, the variable level is null, and
level.trim() generates a NullPointerException.
Strack Trace:
------------------
Exception in thread "Thread-10" java.lang.NullPointerException
at org.apache.log4j.varia.LogFilePatternReceiver.convertToEvent
(LogFilePatternReceiver.java:723)
at org.apache.log4j.varia.LogFilePatternReceiver.buildEvent
(LogFilePatternReceiver.java:404)
at org.apache.log4j.varia.LogFilePatternReceiver.process
(LogFilePatternReceiver.java:437)
at org.apache.log4j.varia.LogFilePatternReceiver$1.run
(LogFilePatternReceiver.java:825)
at java.lang.Thread.run(Unknown Source)
------------------
--
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
|