Class DefaultLog


  • public class DefaultLog
    extends Log
    A default log implementation. The Log class defines how to create Logger-contexts and how to forward messages to the logtargets.
    • Field Detail

      • DEFAULT_LOG_TARGET

        private static final PrintStreamLogTarget DEFAULT_LOG_TARGET
        The default log target.
      • defaultLogInstance

        private static final DefaultLog defaultLogInstance
        The default log instance.
    • Constructor Detail

      • DefaultLog

        protected DefaultLog()
        Creates a new log.
    • Method Detail

      • init

        public void init()
        Initializes the log system after the log module was loaded and a log target was defined. This is the second step of the log initialisation.
        Overrides:
        init in class Log
      • addTarget

        public void addTarget​(LogTarget target)
        Adds a log target to this facility. Log targets get informed, via the LogTarget interface, whenever a message is logged with this class.
        Overrides:
        addTarget in class Log
        Parameters:
        target - the target.
      • getDefaultLog

        public static DefaultLog getDefaultLog()
        Returns the default log.
        Returns:
        The default log.
      • installDefaultLog

        public static void installDefaultLog()
        Makes this implementation the default instance.