Class Logger

java.lang.Object
com.inet.html.utils.Logger

public class Logger extends Object
The logger of the InetHtml Project
  • Field Details

  • Constructor Details

    • Logger

      public Logger()
  • Method Details

    • doesLog

      public static boolean doesLog(int level)
      Checks the log level
      Parameters:
      level - the desired level
      Returns:
      true, if a message with the desired level would be printed
    • critical

      public static final void critical(String msg)
      Logs a critical error
      Parameters:
      msg - the log message
    • critical

      public static final void critical(Throwable t)
      Logs a critical exception
      Parameters:
      t - the log message
    • error

      public static final void error(String msg)
      Logs an error message
      Parameters:
      msg - the error message
    • error

      public static final void error(Throwable t)
      Logs a exception
      Parameters:
      t - the log message
    • warning

      public static final void warning(String msg)
      Logs a warning
      Parameters:
      msg - the log message
    • warning

      public static final void warning(Throwable t)
      Logs a exception
      Parameters:
      t - the log message
    • info

      public static final void info(String msg)
      Logs a user information
      Parameters:
      msg - the log message
    • debug

      public static final void debug(String msg)
      Logs a debug message
      Parameters:
      msg - the log message
    • setLogLevel

      public static void setLogLevel(int level)
      Set the log level
      Parameters:
      level - the desired log level
      See Also:
    • getLogLevel

      public static int getLogLevel()
      Returns the current log level
      Returns:
      the current log level
      See Also:
    • reset

      public static void reset()
      Resets the internal error coutners
    • getCriticals

      public static int getCriticals()
      Returns the number of critical errors since the last reset
      Returns:
      the number of critical errors since the last reset
    • getErrors

      public static int getErrors()
      Returns the number of errors since the last reset
      Returns:
      the number of errors since the last reset
    • getWarnings

      public static int getWarnings()
      Returns the number of warnings since the last reset
      Returns:
      the number of warnings errors since the last reset
    • setAuxConsoleMode

      public static void setAuxConsoleMode(boolean activate)
      Activates a stand-alone frame with a logger console
      Parameters:
      activate - true to activate, false to switch to System.out logging
    • setLogStream

      public static void setLogStream(PrintStream stream)
      Set a custom log output stream.
      Parameters:
      stream - the stream, never null