You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Dmitry Katsubo (JIRA)" <ji...@apache.org> on 2013/05/10 10:31:16 UTC

[jira] [Updated] (LOGGING-152) Helper class that redirects OutputStream to Log

     [ https://issues.apache.org/jira/browse/LOGGING-152?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitry Katsubo updated LOGGING-152:
-----------------------------------

    Description: 
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}

  was:
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}

    
> 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
>         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}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira