Package esmska.utils

Class LogSupport


  • public class LogSupport
    extends java.lang.Object
    Support class for configuring logging capabilities
    • Constructor Summary

      Constructors 
      Constructor Description
      LogSupport()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void enableHttpClientLogging()
      Enable debug messages from HttpClient library
      static java.util.logging.ConsoleHandler getConsoleHandler()
      Get handler for writing logs into console
      static java.util.logging.Logger getEsmskaLogger()
      Get main program logger
      static java.util.logging.FileHandler getFileHandler()
      Get handler for writing logs into file
      static void init()
      Initialize logging.
      static void initFileHandler​(java.io.File logOutput)
      Initialize logfile file handler.
      static void storeRecords​(boolean store)
      Whether to rememeber log records (useful for later inicialization of file handler) or not (and erase old ones).
      • Methods inherited from class java.lang.Object

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

      • LogSupport

        public LogSupport()
    • Method Detail

      • init

        public static void init()
        Initialize logging. Enables console handler. Use at startup.
      • initFileHandler

        public static void initFileHandler​(java.io.File logOutput)
                                    throws java.io.IOException
        Initialize logfile file handler. Republishes any previously stored records into it.
        Parameters:
        logOutput - where to log; not null
        Throws:
        java.io.IOException
      • storeRecords

        public static void storeRecords​(boolean store)
        Whether to rememeber log records (useful for later inicialization of file handler) or not (and erase old ones).
      • getEsmskaLogger

        public static java.util.logging.Logger getEsmskaLogger()
        Get main program logger
      • getConsoleHandler

        public static java.util.logging.ConsoleHandler getConsoleHandler()
        Get handler for writing logs into console
      • getFileHandler

        public static java.util.logging.FileHandler getFileHandler()
        Get handler for writing logs into file
      • enableHttpClientLogging

        public static void enableHttpClientLogging()
        Enable debug messages from HttpClient library