Package Components

Class FileLogger


  • public final class FileLogger
    extends java.lang.Object
    Logger class for logging text and exceptions
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.util.logging.Handler handler  
      private static java.util.logging.Logger logger  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private FileLogger()
      Use of Singleton pattern
    • Method Summary

      Modifier and Type Method Description
      static void closeHandler()
      Closes handler, used after somethings been logged.
      static java.util.logging.Logger getLogger()
      Creates instance of logger and handler
      • Methods inherited from class java.lang.Object

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

      • handler

        private static java.util.logging.Handler handler
      • logger

        private static java.util.logging.Logger logger
    • Constructor Detail

      • FileLogger

        private FileLogger()
        Use of Singleton pattern
    • Method Detail

      • getLogger

        public static java.util.logging.Logger getLogger()
        Creates instance of logger and handler
        Returns:
        an static instance of logger
      • closeHandler

        public static void closeHandler()
        Closes handler, used after somethings been logged. Is necessary for not creating multiple log files.