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 2009/08/12 07:23:54 UTC
DO NOT REPLY [Bug 47684] New: FileAppender.setEncoding() doesn't
works
https://issues.apache.org/bugzilla/show_bug.cgi?id=47684
Summary: FileAppender.setEncoding() doesn't works
Product: Log4j
Version: 1.2
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: critical
Priority: P2
Component: Appender
AssignedTo: log4j-dev@logging.apache.org
ReportedBy: zhouyanming@gmail.com
--- Comment #0 from quaff <zh...@gmail.com> 2009-08-11 22:23:52 PDT ---
Created an attachment (id=24131)
patch for solution1
FileAppender appender = new DailyRollingFileAppender(layout,
getPath(),DATE_STYLE);
//constructor will call FileAppender.setFile(String fileName, boolean append,
boolean bufferedIO, int bufferSize) then call
WriterAppender.createWriter(OutputStream os) then call
WriterAppender.getEncoding()
appender.setEncoding(ENCODING); //no use
appender.setAppend(true);
solution 1:
add encoding to constructor and deprecate setEncoding() method
attachment is a patch.
solution 2:
rebuild QuietWriter when setEncoding()
--
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 47684] FileAppender.setEncoding() doesn't works
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47684
quaff <zh...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |RESOLVED
Resolution| |INVALID
--- Comment #2 from quaff <zh...@gmail.com> 2009-08-23 19:42:53 PDT ---
It does works,thanks
--
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 47684] FileAppender.setEncoding() doesn't works
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=47684
Curt Arnold <ca...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |NEEDINFO
--- Comment #1 from Curt Arnold <ca...@apache.org> 2009-08-23 19:25:35 PDT ---
You did not include your original code that you thought was misbehaving. I'm
guessing that you programatically constructed a RollingFileAppender, then
called setEncoding() but likely did not call activateOptions. A call to
activateOptions() is required after changing any property or set of properties
to make it effective. Appender constructors that take multiple arguments
typically invoke activateOptions as part of the constructor. Configurators or
other code that use the default constructors will construct an appender (or
layout, etc), set properties, and then call activateOptions() to complete the
configuration.
Marking the bug as NEEDINFO for more information.
--
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