Class ControlPanelLog


  • public class ControlPanelLog
    extends Object
    Utilities for setting up Control Panel application log.
    • Constructor Detail

      • ControlPanelLog

        public ControlPanelLog()
    • Method Detail

      • initLogFileHandler

        public static void initLogFileHandler​(File file)
                                       throws IOException
        Creates a new file handler for writing log messages to the file indicated by file.
        Parameters:
        file - log file to which log messages will be written
        Throws:
        IOException - if something goes wrong
      • initPackage

        public static void initPackage​(String packageName)
                                throws IOException
        Writes messages under a given package in the file handler defined when calling initLogFileHandler. Note that initLogFileHandler should be called before calling this method.
        Parameters:
        packageName - the package name.
        Throws:
        IOException - if something goes wrong
      • getLogFile

        public static File getLogFile()
        Gets the name of the log file.
        Returns:
        File representing the log file
      • isInitialized

        public static boolean isInitialized()
        Indicates whether the log file has been initialized.
        Returns:
        true when the log file has been initialized
      • closeAndDeleteLogFile

        public static void closeAndDeleteLogFile()
        Closes the log file and deletes it.