Class Logger

java.lang.Object
org.ek9lang.core.Logger

public class Logger extends Object
Wrapper for logging.
  • Method Summary Link icon

    Modifier and Type
    Method
    Description
    static void
    debug(Object content)
    Conditionally output debug information to stderr.
    static void
    debugf(String format, Object... args)
    Conditionally output debug information to stderr, using printf format.
    static void
    enableDebug(boolean enabled)
    enable of disable debug output.
    static void
    error(Object content)
    Log an error unless muting is enabled.
    static void
    error(Throwable throwable)
    Log a throwable stack trace unless muting is enabled.
    static void
    log(String content)
    Logs output to stdout.
    static void
    setMuteStderrOutput(boolean muteStderrOutput)
    Mute stderr output, but default the Logger uses stderr to report errors.

    Methods inherited from class java.lang.Object Link icon

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details Link icon

    • enableDebug Link icon

      public static void enableDebug(boolean enabled)
      enable of disable debug output.
      Parameters:
      enabled - by default Logger disabled debug output.
    • setMuteStderrOutput Link icon

      public static void setMuteStderrOutput(boolean muteStderrOutput)
      Mute stderr output, but default the Logger uses stderr to report errors.
      Parameters:
      muteStderrOutput - by default Logger does not mute stderr, (for tests it is handy to switch off).
    • debug Link icon

      public static void debug(Object content)
      Conditionally output debug information to stderr.
    • log Link icon

      public static void log(String content)
      Logs output to stdout.
    • debugf Link icon

      public static void debugf(String format, Object... args)
      Conditionally output debug information to stderr, using printf format.
    • error Link icon

      public static void error(Object content)
      Log an error unless muting is enabled.
      Parameters:
      content - The content to log to stderr.
    • error Link icon

      public static void error(Throwable throwable)
      Log a throwable stack trace unless muting is enabled.
      Parameters:
      throwable - The throwable and its stack to log to stderr.