Class LogUtil


  • public class LogUtil
    extends Object
    Simple static class that supplies PrintStreams for log methods. This class was borrowed from Nutch, a sub-project of Apache Lucene, and made conformant to Java 1.5 coding style.
    Author:
    Uwe Schindler, Jérôme Charron (Nutch)
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static PrintStream getDebugStream​(org.apache.commons.logging.Log logger)
      Returns a PrintStream that logs all output with DEBUG method to the given Commons Logging logger.
      static PrintStream getErrorStream​(org.apache.commons.logging.Log logger)
      Returns a PrintStream that logs all output with ERROR method to the given Commons Logging logger.
      static PrintStream getFatalStream​(org.apache.commons.logging.Log logger)
      Returns a PrintStream that logs all output with FATAL method to the given Commons Logging logger.
      static PrintStream getInfoStream​(org.apache.commons.logging.Log logger)
      Returns a PrintStream that logs all output with INFO method to the given Commons Logging logger.
      static PrintStream getTraceStream​(org.apache.commons.logging.Log logger)
      Returns a PrintStream that logs all output with TRACE method to the given Commons Logging logger.
      static PrintStream getWarnStream​(org.apache.commons.logging.Log logger)
      Returns a PrintStream that logs all output with WARN method to the given Commons Logging logger.
    • Method Detail

      • getTraceStream

        public static PrintStream getTraceStream​(org.apache.commons.logging.Log logger)
        Returns a PrintStream that logs all output with TRACE method to the given Commons Logging logger.
      • getDebugStream

        public static PrintStream getDebugStream​(org.apache.commons.logging.Log logger)
        Returns a PrintStream that logs all output with DEBUG method to the given Commons Logging logger.
      • getInfoStream

        public static PrintStream getInfoStream​(org.apache.commons.logging.Log logger)
        Returns a PrintStream that logs all output with INFO method to the given Commons Logging logger.
      • getWarnStream

        public static PrintStream getWarnStream​(org.apache.commons.logging.Log logger)
        Returns a PrintStream that logs all output with WARN method to the given Commons Logging logger.
      • getErrorStream

        public static PrintStream getErrorStream​(org.apache.commons.logging.Log logger)
        Returns a PrintStream that logs all output with ERROR method to the given Commons Logging logger.
      • getFatalStream

        public static PrintStream getFatalStream​(org.apache.commons.logging.Log logger)
        Returns a PrintStream that logs all output with FATAL method to the given Commons Logging logger.