public class LogConfig extends Object
java.util.logging
Modifier and Type | Field and Description |
---|---|
static String |
CONFIG_PROP
Name of system property containing (
setConfiguration(java.lang.String) -style)
default logging configuration string. |
Constructor and Description |
---|
LogConfig() |
Modifier and Type | Method and Description |
---|---|
static void |
initFromProperty()
Initializes logging from the value of the
CONFIG_PROP
property if it is defined. |
static void |
setConfiguration(String config)
Sets the logging level(s) from a short string, the kind of thing
you might get from a command-line switch.
|
public static String CONFIG_PROP
setConfiguration(java.lang.String)
-style)
default logging configuration string.initFromProperty()
public static void setConfiguration(String config)
The format of the string is a comma-separated list of zero or more directives, each of the form
[<handlername>=]<level>if <handlername> is omitted the root handler is assumed. The <level> can be either one of the
Level
names (case-insensitive)
or an equivalent integer value.config
- configure stringIllegalArgumentException
- if config
is of the
wrong formpublic static void initFromProperty()
CONFIG_PROP
property if it is defined. If it is not, and if neither of the
standard LogManager
control properties
(java.util.logging.config.class
,
java.util.logging.config.file
) are defined either,
then the logging system is initialized so that only messages
of
java.util.logging
properties are not defined either
(these
standardCopyright © 2003-2025 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.