public final class LoggingConfiguration
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
confbase
Configuration base
|
protected static LoggingConfiguration |
config
Static instance of the configuration
|
static boolean |
DEBUG
General debug flag.
|
private static java.util.logging.Logger |
LOGGER_ELKI_TOP
Logger for ELKI top level package.
|
private static java.util.logging.Logger |
LOGGER_GLOBAL_TOP
Top level logger.
|
private static java.util.logging.Logger |
LOGGER_TIME_TOP
Logger for ELKI timing.
|
private static java.lang.String |
LOGGING_PROPERTIES_FILE
Configuration file name
|
private static java.lang.String |
TOPLEVEL_PACKAGE
Top level ELKI package (for setting 'verbose')
|
Modifier | Constructor and Description |
---|---|
private |
LoggingConfiguration(java.lang.String pkg,
java.lang.String name)
Configure Java Logging API:
LogManager |
Modifier and Type | Method and Description |
---|---|
static void |
addHandler(java.util.logging.Handler handler)
Add a handler to the root logger.
|
static void |
assertConfigured()
Assert that logging was configured.
|
private static java.io.InputStream |
openSystemFile(java.lang.String filename)
Private copy from FileUtil, to avoid cross-dependencies.
|
private void |
privateReconfigureLogging(java.lang.String pkg,
java.lang.String name)
Reconfigure logging.
|
static void |
reconfigureLogging(java.lang.String pkg,
java.lang.String name)
Reconfigure logging.
|
static void |
replaceDefaultHandler(java.util.logging.Handler handler)
Replace the default log handler with the given log handler.
|
static void |
setDefaultLevel(java.util.logging.Level level)
Set the default level.
|
static void |
setLevelFor(java.lang.String pkg,
java.lang.String level)
Set the logging level for a particular package/class.
|
static void |
setStatistics()
Enable runtime performance logging.
|
static void |
setVerbose(java.util.logging.Level verbose)
Reconfigure logging to enable 'verbose' logging at the top level.
|
public static boolean DEBUG
private static final java.lang.String LOGGING_PROPERTIES_FILE
private static final java.lang.String TOPLEVEL_PACKAGE
private static final java.util.logging.Logger LOGGER_GLOBAL_TOP
private static final java.util.logging.Logger LOGGER_ELKI_TOP
private static final java.util.logging.Logger LOGGER_TIME_TOP
private static final java.lang.String confbase
protected static LoggingConfiguration config
private LoggingConfiguration(java.lang.String pkg, java.lang.String name)
LogManager
public static void reconfigureLogging(java.lang.String pkg, java.lang.String name)
pkg
- Package name the configuration file comes fromname
- File name.private void privateReconfigureLogging(java.lang.String pkg, java.lang.String name)
pkg
- Package name the configuration file comes fromname
- File name.private static java.io.InputStream openSystemFile(java.lang.String filename) throws java.io.FileNotFoundException
filename
- File name in system notationjava.io.FileNotFoundException
- When no file was found.public static void assertConfigured()
public static void setVerbose(java.util.logging.Level verbose)
verbose
- verbosity level.public static void setStatistics()
public static void addHandler(java.util.logging.Handler handler)
handler
- Handlerpublic static void replaceDefaultHandler(java.util.logging.Handler handler)
CLISmartHandler
found on the root logger. It
will leave any other handlers in place.handler
- Logging handler.public static void setLevelFor(java.lang.String pkg, java.lang.String level) throws java.lang.IllegalArgumentException
pkg
- Packagelevel
- Level namejava.lang.IllegalArgumentException
- thrown when logger or level was not foundpublic static void setDefaultLevel(java.util.logging.Level level)
level
- levelCopyright © 2019 ELKI Development Team. License information.