Module jcifs

Class LogStream

All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable

public class LogStream extends PrintStream
0 - nothing 1 - critical [default] 2 - basic info can be logged under load 3 - almost everything N - debugging
  • Field Details

    • level

      public static int level
      The current logging level.
  • Constructor Details

    • LogStream

      public LogStream(PrintStream stream)
      Constructs a LogStream with the specified output stream.
      Parameters:
      stream - the output stream for logging
  • Method Details

    • setLevel

      public static void setLevel(int level)
      Sets the logging level.
      Parameters:
      level - the logging level to set
    • setInstance

      public static void setInstance(PrintStream stream)
      This must be called before getInstance is called or it will have no effect.
      Parameters:
      stream - the PrintStream to use for logging
    • getInstance

      public static LogStream getInstance()
      Returns the singleton LogStream instance.
      Returns:
      the LogStream instance