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 2008/11/04 18:52:42 UTC
DO NOT REPLY [Bug 46144] New: QuietWriter.write should ignore all
Exceptions
https://issues.apache.org/bugzilla/show_bug.cgi?id=46144
Summary: QuietWriter.write should ignore all Exceptions
Product: Log4j
Version: 1.2
Platform: PC
OS/Version: Mac OS X 10.4
Status: NEW
Severity: normal
Priority: P2
Component: Appender
AssignedTo: log4j-dev@logging.apache.org
ReportedBy: yozh@mx1.ru
QuietWriter.write should ignore all Exception's, not only IOException.
Actually, it should ignore NullPointerException or just check input string for
null.
java.util.Writer.write
throws NullPointerException if passed string is null, and if null string
accidentally appeared in QuietWriter.write, it should be ignored, rather then
NullPointerException thrown.
Currently we have rare NullPointerException in logs somewhere inside log4j, and
we cannot repeat this situation:
===
java.lang.NullPointerException
at java.io.Writer.write(Writer.java:140)
at org.apache.log4j.helpers.QuietWriter.write(QuietWriter.java:48)
at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:309)
at org.apache.log4j.WriterAppender.append(WriterAppender.java:160)
at
ru.yandex.video.converter.convert.ConfiguredFileAppender.append(ConfiguredFileAppender.java:23)
at
org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
===
log4j is 1.2.15. Proposed solution avoids NullPointerException (though probably
causes some information loss).
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
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 46144] QuietWriter.write should ignore all
Exceptions
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46144
Curt Arnold <ca...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #1 from Curt Arnold <ca...@apache.org> 2009-01-08 10:14:39 PST ---
Added check for null argument in rev 732774.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org