public class LogPropertiesLoader extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
LOG_CONF_FILE
if the property to define a config file is set then the corresponding file
is used for properties otherwise it is "LOG_PROPS"
|
static String |
LOG_PROPS |
| Constructor and Description |
|---|
LogPropertiesLoader() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
configureHandler(String handlerName,
Handler handler)
should set level, formatter, filter
|
boolean |
getBooleanProperty(String name,
boolean defaultValue) |
Filter |
getFilterProperty(String name,
Filter defaultValue) |
Formatter |
getFormatterProperty(String name,
Formatter defaultValue) |
int |
getIntProperty(String name,
int defaultValue) |
Level |
getLevelProperty(String name,
Level defaultValue) |
String |
getProperty(String property) |
String |
getStringProperty(String name,
String defaultValue) |
static Optional<LogManager> |
getSystemLoaderLogManager()
this method guarantees that the LogProperties Loader has been initialized
(in the context of the current ClassLoader)
|
protected void |
handlersLazyLoad()
initialize the Handlers that are in the current ClassLoader
the "top" manager may not have access to the Handlers classes.
|
static Formatter |
loaderGetFormatterProperty(String name,
Formatter defaultValue) |
static int |
loaderGetIntProperty(String name,
int defaultValue) |
static Level |
loaderGetLevelProperty(String name,
Level defaultValue) |
static String |
loaderGetProperty(String name) |
static String |
loaderGetStringProperty(String name,
String defaultValue) |
protected void |
loadLoggerHandlers(String loggerName,
Logger logger)
add Handlers to a Logger known to the LogManager.
|
protected String |
replace(String str,
Properties props)
System property replacement in the given string.
|
public static final String LOG_PROPS
public static final String LOG_CONF_FILE
public static Optional<LogManager> getSystemLoaderLogManager()
protected void handlersLazyLoad()
throws IOException
IOExceptionprotected void loadLoggerHandlers(String loggerName, Logger logger) throws IOException
loggerName - logger - IOExceptionprotected void configureHandler(String handlerName, Handler handler)
handlerName - handler - protected String replace(String str, Properties props)
str - The original stringpublic static String loaderGetStringProperty(String name, String defaultValue)
public static int loaderGetIntProperty(String name, int defaultValue)
public static Formatter loaderGetFormatterProperty(String name, Formatter defaultValue)
public int getIntProperty(String name, int defaultValue)
public boolean getBooleanProperty(String name, boolean defaultValue)
Copyright © 2014 LSST. All rights reserved.