Class TracingPrintStream

  • All Implemented Interfaces:
    java.io.Closeable, java.io.Flushable, java.lang.Appendable, java.lang.AutoCloseable

    public class TracingPrintStream
    extends java.io.PrintStream
    PrintStream which redirects it's output to a given logger.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static int BASE_DEPTH  
      private org.apache.logging.log4j.Logger logger  
      • Fields inherited from class java.io.FilterOutputStream

        out
    • Constructor Summary

      Constructors 
      Constructor Description
      TracingPrintStream​(org.apache.logging.log4j.Logger logger, java.io.PrintStream original)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private static java.lang.String getPrefix()  
      private void log​(java.lang.String s)  
      void println​(boolean x)  
      void println​(char x)  
      void println​(char[] x)  
      void println​(double x)  
      void println​(float x)  
      void println​(int x)  
      void println​(long x)  
      void println​(java.lang.Object o)  
      void println​(java.lang.String s)  
      • Methods inherited from class java.io.PrintStream

        append, append, append, checkError, clearError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, setError, write, write
      • Methods inherited from class java.io.FilterOutputStream

        write
      • Methods inherited from class java.io.OutputStream

        nullOutputStream
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • logger

        private final org.apache.logging.log4j.Logger logger
    • Constructor Detail

      • TracingPrintStream

        public TracingPrintStream​(org.apache.logging.log4j.Logger logger,
                                  java.io.PrintStream original)
    • Method Detail

      • log

        private void log​(java.lang.String s)
      • getPrefix

        private static java.lang.String getPrefix()
      • println

        public void println​(java.lang.Object o)
        Overrides:
        println in class java.io.PrintStream
      • println

        public void println​(java.lang.String s)
        Overrides:
        println in class java.io.PrintStream
      • println

        public void println​(boolean x)
        Overrides:
        println in class java.io.PrintStream
      • println

        public void println​(char x)
        Overrides:
        println in class java.io.PrintStream
      • println

        public void println​(int x)
        Overrides:
        println in class java.io.PrintStream
      • println

        public void println​(long x)
        Overrides:
        println in class java.io.PrintStream
      • println

        public void println​(float x)
        Overrides:
        println in class java.io.PrintStream
      • println

        public void println​(double x)
        Overrides:
        println in class java.io.PrintStream
      • println

        public void println​(char[] x)
        Overrides:
        println in class java.io.PrintStream