Class WriterBasedFileLog

  • All Implemented Interfaces:
    java.lang.AutoCloseable, SingleStreamLogger

    public final class WriterBasedFileLog
    extends java.lang.Object
    implements SingleStreamLogger
    This class writes log information to file.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.io.BufferedWriter bw  
    • Constructor Summary

      Constructors 
      Constructor Description
      WriterBasedFileLog​(java.lang.String fileName, boolean append)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      void log​(java.lang.String s)
      Log the String to file.
      • Methods inherited from class java.lang.Object

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

      • bw

        private final java.io.BufferedWriter bw
    • Constructor Detail

      • WriterBasedFileLog

        public WriterBasedFileLog​(java.lang.String fileName,
                                  boolean append)
    • Method Detail

      • log

        public void log​(java.lang.String s)
        Log the String to file.
        Specified by:
        log in interface SingleStreamLogger
        Parameters:
        s - Exception that was thrown.
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface SingleStreamLogger