Class DefaultLogger

  • All Implemented Interfaces:
    ResolverLogger

    public class DefaultLogger
    extends AbstractLogger
    The default logger logs to System.err.

    By default, the DEFAULT_LOGGER_LOG_LEVEL feature determines which messages are logged. The valid levels are "debug", "info", "warn", and "none". An invalid level is treated as "warn".

    If the level is set to "debug", all messages will be printed. If set to "info", info and warning messages will be printed. If set to "warn", only warning messages will be printed. If set to "none", no messages are printed.

    If the configuration's DEFAULT_LOGGER_LOG_LEVEL is changed, that change will be detected by the logger and it will use that level going forward. The value can also be changed directly by calling setLogLevel(java.lang.String). That level will remain in effect as long as the configuration default does not change.

    • Method Detail

      • getLogLevel

        public java.lang.String getLogLevel()
        Get the current logging level.
        Returns:
        the current logging level
      • setLogLevel

        public void setLogLevel​(java.lang.String level)
        Set the current logging level.
        Parameters:
        level - The logging level.
      • info

        public void info​(java.lang.String message)
        Writes an informational message to System.err.
        Parameters:
        message - The message.
      • debug

        public void debug​(java.lang.String message)
        Writes a debug message to System.err.
        Parameters:
        message - The message.
      • warn

        public void warn​(java.lang.String message)
        Writes a warning message to System.err.
        Parameters:
        message - The message.