Class Logger

java.lang.Object
adaa.analytics.rules.utils.Logger

public class Logger extends Object
Auxiliary singleton class for logging.
  • Method Details

    • getInstance

      public static Logger getInstance()
      Gets instance.
    • addStream

      public void addStream(PrintStream ps, Level lvl)
      Adds a new print stream.
      Parameters:
      ps - Print stream.
      lvl - Logging level.
    • log

      public static void log(String msg, Level lvl)
      Singleton method which calls run(String, Level) on the singleton instance.
      Parameters:
      msg - Message.
      lvl - Importance level of a message.
    • isLogLevelEnabled

      public boolean isLogLevelEnabled(Level lvl)
    • run

      public void run(String msg, Level lvl)
      Logs a message on all streams with logging level smaller than the message level.
      Parameters:
      msg - Message.
      lvl - Importance level of message.