Class Logger


  • public class Logger
    extends Object
    Simple logging support for the framework. You need to add a logging listener that needs to send the logging events to a backend.
    Author:
    Markus Bernhardt, Copyright 2016, Bernd Rosstauscher, Copyright 2009
    • Constructor Detail

      • Logger

        public Logger()
    • Method Detail

      • getBackend

        public static Logger.LogBackEnd getBackend()
        Gets the currently attached logging backend.
        Returns:
        Returns the backend.
      • setBackend

        public static void setBackend​(Logger.LogBackEnd backend)
        Attaches a new logging backend replacing the existing one.
        Parameters:
        backend - The backend to set.
      • log

        public static void log​(Class<?> clazz,
                               Logger.LogLevel loglevel,
                               String msg,
                               Object... params)
        Logs a message.
        Parameters:
        clazz - the class that sends the log message.
        loglevel - the logging level.
        msg - the message format string.
        params - the message parameters for the format string.