You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Elliotte Rusty Harold (Jira)" <ji...@apache.org> on 2024/02/11 12:54:00 UTC
[jira] [Commented] (LOGGING-152) Helper class that redirects OutputStream to Log
[ https://issues.apache.org/jira/browse/LOGGING-152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17816406#comment-17816406 ]
Elliotte Rusty Harold commented on LOGGING-152:
-----------------------------------------------
Feels like the wrong place to put this. It's not how logs usually work. Plus it's unclear if we want to add any new features to commons-logging rather than nudging users onto other frameworks. I suggest closing as won't do.
> 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)