[ 
https://issues.apache.org/jira/browse/LOGGING-152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17818577#comment-17818577
 ] 

Gary D. Gregory commented on LOGGING-152:
-----------------------------------------

Note that this feature is supported by Log4j

[https://logging.apache.org/log4j/2.x/log4j-iostreams.html]

Very handy with JDBC drivers!

 

> Helper class that redirects OutputStream to Log
> -----------------------------------------------
>
>                 Key: LOGGING-152
>                 URL: https://issues.apache.org/jira/browse/LOGGING-152
>             Project: Commons Logging
>          Issue Type: Improvement
>    Affects Versions: 1.1.1
>            Reporter: Dmitry Katsubo
>            Priority: Major
>         Attachments: LoggingOutputStream.java
>
>
> Some libraries accept {{PrintStream}} or {{OutputStream}} as a target for 
> debug messages to be printed to. The attached class acts as a bridge between 
> {{OutputStream}} and {{org.apache.commons.logging.Log}}.
> Example of usage:
> {code}
> PrintStream loggingPrintStream = new PrintStream(new 
> LoggingOutputStream(logger, LoggingOutputStream.LogLevel.INFO, "[XJC] "));
> com.sun.tools.xjc.Driver.run(opts, loggingPrintStream, loggingPrintStream);
> {code}
> Also has some overlap with LOGGING-110.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to