Class CollectorLogger


  • public class CollectorLogger
    extends Log.LoggerFacade
    Logger back-end that collects messages in memory.
    Purpose is to collect errors and warnings during some operation to enable the software to give hints about the reason of failure. E.g by providing an detailed error-report about the operation.
    It is used by Log.startCollectMessages(int, boolean).
    • Constructor Detail

      • CollectorLogger

        public CollectorLogger()
        Creates a new CollectorLogger.
    • Method Detail

      • addMessage

        protected void addMessage​(int level,
                                  java.lang.CharSequence msg,
                                  java.lang.Throwable t)
      • hasThreadLog

        public boolean hasThreadLog()
      • error

        public void error​(java.lang.CharSequence msg)
        Description copied from class: Log.LoggerFacade
        Logs an error message.
        Specified by:
        error in class Log.LoggerFacade
        Parameters:
        msg - The text to log.
      • warn

        public void warn​(java.lang.CharSequence msg)
        Description copied from class: Log.LoggerFacade
        Logs a warning message.
        Specified by:
        warn in class Log.LoggerFacade
        Parameters:
        msg - The text to log.
      • info

        public void info​(java.lang.CharSequence msg)
        Description copied from class: Log.LoggerFacade
        Logs an informational message.
        Specified by:
        info in class Log.LoggerFacade
        Parameters:
        msg - The text to log.
      • debug

        public void debug​(java.lang.CharSequence msg)
        Description copied from class: Log.LoggerFacade
        Logs a debugging message.
        Specified by:
        debug in class Log.LoggerFacade
        Parameters:
        msg - The text to log.
      • error

        public void error​(java.lang.CharSequence msg,
                          java.lang.Throwable t)
        Description copied from class: Log.LoggerFacade
        Logs an error message plus message and stack-trace of the Throwable.
        Overrides:
        error in class Log.LoggerFacade
        Parameters:
        msg - The text to log.
        t - The Throwable to trace.
      • warn

        public void warn​(java.lang.CharSequence msg,
                         java.lang.Throwable t)
        Description copied from class: Log.LoggerFacade
        Logs a warning message error plus message and stack-trace of the Throwable.
        Overrides:
        warn in class Log.LoggerFacade
        Parameters:
        msg - The text to log.
        t - The Throwable to trace.
      • debug

        public void debug​(java.lang.CharSequence msg,
                          java.lang.Throwable t)
        Description copied from class: Log.LoggerFacade
        Logs a warning message error plus message and stack-trace of the Throwable.
        Overrides:
        debug in class Log.LoggerFacade
        Parameters:
        msg - The text to log.
        t - The Throwable to trace.
      • info

        public void info​(java.lang.CharSequence msg,
                         java.lang.Throwable t)
        Description copied from class: Log.LoggerFacade
        Logs an informational message error plus message and stack-trace of the Throwable.
        Overrides:
        info in class Log.LoggerFacade
        Parameters:
        msg - The text to log.
        t - The Throwable to trace.