Class LogService


  • public final class LogService
    extends java.lang.Object
    A simple log service which can be used to remove any bootstrap handlers when a real handler is configured.
    • Constructor Summary

      Constructors 
      Constructor Description
      LogService()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void create()
      Create lifecycle method.
      void destroy()
      Destroy lifecycle method.
      private static void safeClose​(java.util.logging.Handler handler)  
      private static void safeFlush​(java.util.logging.Handler handler)  
      void start()
      Start method; removes and saves bootstrap handlers.
      void stop()
      Stop method; removes root handlers and restores the bootstrap handlers.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • log

        private static final Logger log
      • rootLogger

        private static final Logger rootLogger
      • bootstrapHandlers

        private java.util.logging.Handler[] bootstrapHandlers
    • Constructor Detail

      • LogService

        public LogService()
    • Method Detail

      • create

        public void create()
        Create lifecycle method.
      • start

        public void start()
        Start method; removes and saves bootstrap handlers.
      • stop

        public void stop()
        Stop method; removes root handlers and restores the bootstrap handlers.
      • safeFlush

        private static void safeFlush​(java.util.logging.Handler handler)
      • safeClose

        private static void safeClose​(java.util.logging.Handler handler)
      • destroy

        public void destroy()
        Destroy lifecycle method.