Package org.planit.logging
Class Logging
- java.lang.Object
-
- org.planit.logging.Logging
-
public class Logging extends Object
Utility class to close the current logger- Author:
- gman6028
-
-
Constructor Summary
Constructors Constructor Description Logging()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
closeLogger(Logger logger)
Close the current loggerstatic Logger
createLogger(Class<?> clazz)
Create logger using default values in logging properties resource filestatic Logger
createLogger(Class<?> clazz, String loggingFileName)
Create logger This method is unlikely to be used directly since the value of logFileSystemProperty should never be changed from its default.
-
-
-
Method Detail
-
closeLogger
public static void closeLogger(Logger logger)
Close the current logger- Parameters:
logger
- the logger to be closed
-
createLogger
public static Logger createLogger(Class<?> clazz) throws Exception
Create logger using default values in logging properties resource file- Parameters:
clazz
- class for which the logger is being created- Returns:
- the logger for this class
- Throws:
Exception
- thrown if log file cannot be opened
-
createLogger
public static Logger createLogger(Class<?> clazz, String loggingFileName) throws Exception
Create logger This method is unlikely to be used directly since the value of logFileSystemProperty should never be changed from its default.- Parameters:
clazz
- class for which the logger is being createdloggingFileName
- name of logging properties file- Returns:
- the logger for this class
- Throws:
Exception
- thrown if log file cannot be opened
-
-