Uploaded image for project: 'Commons Logging'
  1. Commons Logging
  2. LOGGING-152

Helper class that redirects OutputStream to Log

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.1.1
    • None
    • None

    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:

      PrintStream loggingPrintStream = new PrintStream(new LoggingOutputStream(logger, LoggingOutputStream.LogLevel.INFO, "[XJC] "));
      
      com.sun.tools.xjc.Driver.run(opts, loggingPrintStream, loggingPrintStream);
      

      Also has some overlap with LOGGING-110.

      Attachments

        1. LoggingOutputStream.java
          2 kB
          Dmitry Katsubo

        Activity

          People

            Unassigned Unassigned
            dma_k Dmitry Katsubo
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: