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/06/28 18:27:17 UTC
DO NOT REPLY [Bug 42772] New: - add a "getOutputStream()" Method to Appender
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=42772>.
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=42772
Summary: add a "getOutputStream()" Method to Appender
Product: Log4j
Version: 1.2
Platform: Other
OS/Version: other
Status: NEW
Severity: enhancement
Priority: P2
Component: Appender
AssignedTo: log4j-dev@logging.apache.org
ReportedBy: hauser@acm.org
A javamail service is used as an daemon via an /etc/init.d script.
Javamail trace sends debug to stdout or stderr.
init.d scripts normally suppress stdout and stderr, but use things like
RollingFileAppender.
There is
javax.mail.Session.setDebugOut(PrintStream arg0)
method I could use to redirect the javamail debug output into log4j as well.
Preferrably, I would in the class where where I setup the javamail session take
the logger, inspect its appenders and then have the session's DebugOut use that too.
Unfortunately, it appears that the suggested method is missing.
I see http://logging.apache.org/log4j/docs/faq.html#3.3 for multiple processes
to the same file, in the current case, this appears to be an overkill since it
is definitely the same process, most likely even the same thread.
--
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 42772] - add a "getOutputStream()" Method to Appender
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=42772>.
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=42772
------- Additional Comments From hauser@acm.org 2007-06-28 11:33 -------
bill.shannon@sun.com from the javamail project:
In GlassFish there's a special OutputStream I wrote that takes the debug output
and turns it into calls to the java.util.logging.Logger API. It's not that hard
to do.
You can also modify your init script to redirect stdout to a file when running
your program.
--
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 42772] - add a "getOutputStream()" Method to Appender
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=42772>.
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=42772
carnold@apache.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WONTFIX
------- Additional Comments From carnold@apache.org 2007-08-21 15:05 -------
It would be difficult to do for general use. You would not want to directly pipe content to an Appender
since it would bypass the synchronization code that is in the event dispatching. A better approach would
be to pipe an PrintStream and have it creating logging events that are then sent to a logger, but you would
need to be able to customize the target logger, the level for the event, when to create an event (once per
line, once at stream closing, on particular keywords). Nothing prevents you from writing that code (like
the Glassfish project did), but until the code is generally useful it shouldn't go in log4j itself.
--
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 42772] - add a "getOutputStream()" Method to Appender
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=42772>.
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=42772
------- Additional Comments From hauser@acm.org 2007-07-02 22:40 -------
see
https://glassfish.dev.java.net/source/browse/glassfish/appserv-core/src/java/com/sun/enterprise/naming/LogOutputStream.java?rev=1.4&view=markup
or
glassFish:appserv-core/src/java/com/sun/enterprise/naming/MailLogOutputStream.java
--
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