Class ControlPanelLog
- java.lang.Object
-
- org.opends.guitools.controlpanel.util.ControlPanelLog
-
public class ControlPanelLog extends Object
Utilities for setting up Control Panel application log.
-
-
Constructor Summary
Constructors Constructor Description ControlPanelLog()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidcloseAndDeleteLogFile()Closes the log file and deletes it.static FilegetLogFile()Gets the name of the log file.static voidinitLogFileHandler(File file)Creates a new file handler for writing log messages to the file indicated byfile.static voidinitPackage(String packageName)Writes messages under a given package in the file handler defined when calling initLogFileHandler.static booleanisInitialized()Indicates whether the log file has been initialized.
-
-
-
Method Detail
-
initLogFileHandler
public static void initLogFileHandler(File file) throws IOException
Creates a new file handler for writing log messages to the file indicated byfile.- 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.
-
-