Class LogConfig
java.lang.Object
uk.ac.starlink.topcat.LogConfig
Utility methods for setting logging levels.
- Since:
- 16 Jun 2005
- Author:
- Mark Taylor (Starlink)
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic StringName of system property containing (setConfiguration(String)-style) default logging configuration string. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidInitializes logging from the value of theCONFIG_PROPproperty if it is defined.static voidsetConfiguration(String config) Sets the logging level(s) from a short string, the kind of thing you might get from a command-line switch.
-
Field Details
-
CONFIG_PROP
Name of system property containing (setConfiguration(String)-style) default logging configuration string.- See Also:
-
-
Constructor Details
-
LogConfig
public LogConfig()
-
-
Method Details
-
setConfiguration
Sets the logging level(s) from a short string, the kind of thing you might get from a command-line switch.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 theLevelnames (case-insensitive) or an equivalent integer value.- Parameters:
config- configure string- Throws:
IllegalArgumentException- ifconfigis of the wrong form
-
initFromProperty
public static void initFromProperty()Initializes logging from the value of theCONFIG_PROPproperty if it is defined. If it is not, and if neither of the standardLogManagercontrol properties (java.util.logging.config.class,java.util.logging.config.file) are defined either, then the logging system is initialized so that only messages ofjava.util.loggingproperties are not defined either (these standard
-