public final class LoggingConfiguration extends Object
Modifier and Type | Field and Description |
---|---|
private static String |
CLIConffile
Configuration file name
|
private static String |
confbase
Configuration base
|
protected static LoggingConfiguration |
config
Static instance of the configuration
|
static boolean |
DEBUG
General debug flag.
|
private static String |
TOPLEVEL_PACKAGE
Top level ELKI package (for setting 'verbose')
|
Modifier | Constructor and Description |
---|---|
private |
LoggingConfiguration(String pkg,
String name)
Configure Java Logging API:
LogManager |
Modifier and Type | Method and Description |
---|---|
static void |
addHandler(Handler handler)
Add a handler to the root logger.
|
static void |
assertConfigured()
Assert that logging was configured.
|
private void |
privateReconfigureLogging(String pkg,
String name)
Reconfigure logging.
|
static void |
reconfigureLogging(String pkg,
String name)
Reconfigure logging.
|
static void |
replaceDefaultHandler(Handler handler)
Replace the default log handler with the given log handler.
|
static void |
setDefaultLevel(Level level)
Set the default level.
|
static void |
setLevelFor(String pkg,
String level)
Set the logging level for a particular package/class.
|
static void |
setVerbose(boolean verbose)
Reconfigure logging to enable 'verbose' logging at the top level.
|
public static boolean DEBUG
private static final String CLIConffile
private static final String TOPLEVEL_PACKAGE
private static final String confbase
protected static LoggingConfiguration config
private LoggingConfiguration(String pkg, String name)
LogManager
public static void reconfigureLogging(String pkg, String name)
pkg
- Package name the configuration file comes fromname
- File name.private void privateReconfigureLogging(String pkg, String name)
pkg
- Package name the configuration file comes fromname
- File name.public static void assertConfigured()
public static void setVerbose(boolean verbose)
verbose
- verbose flagpublic static void addHandler(Handler handler)
handler
- Handlerpublic static void replaceDefaultHandler(Handler handler)
CLISmartHandler
found on the root logger. It
will leave any other handlers in place.handler
- Logging handler.public static void setLevelFor(String pkg, String level) throws IllegalArgumentException
pkg
- Packagelevel
- Level nameIllegalArgumentException
- thrown when logger or level was not foundpublic static void setDefaultLevel(Level level)
level
- level