public class PropertiesConfAccess
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTIVATION |
static java.lang.String |
ADDITIVITY_FIELD |
static java.lang.String |
CLEAN_HANDLERS_FIELD |
static boolean |
debug |
static char |
DOT |
static java.lang.String |
HANDLER_FIELD |
static java.lang.String |
HANDLER_TYPE_ATTRIBUTE |
static java.lang.String |
HANDLER_TYPE_ATTRIBUTE_CONSOLE_VALUE |
static java.lang.String |
HANDLER_TYPE_ATTRIBUTE_FILE_VALUE |
static java.lang.String |
HANDLER_TYPE_ATTRIBUTE_JMX_VALUE |
static java.lang.String |
HANDLER_TYPE_ATTRIBUTE_NTEVENT_VALUE |
static java.lang.String |
HANDLER_TYPE_ATTRIBUTE_ROLLING_FILE_VALUE |
static java.lang.String |
LEVEL_FIELD |
static java.lang.String |
LOGGER_FIELD |
protected java.util.Vector |
loggerCleaned |
static java.lang.String |
TOPIC_FIELD |
static java.lang.String |
USE_PARENT_FIELD |
Constructor and Description |
---|
PropertiesConfAccess() |
Modifier and Type | Method and Description |
---|---|
protected void |
cleanOldHandler(TopicalLogger l)
Clear all the handlers associated to a logger which are not defined into
this file
|
void |
debug(java.lang.String m) |
protected java.lang.String[] |
getDependsLevel(java.lang.String expr)
It retrieves the list of the referenced levels in the String parameter.
|
protected boolean |
isDefaultLevel(Level l)
It checks if the level parameter is a default monolog level.
|
static void |
load(java.util.Properties prop,
LoggerFactory lof,
HandlerFactory hf,
LevelFactory lef) |
static void |
load(java.util.Properties prop,
MonologFactory mf) |
protected Handler |
parseHandlerProp(java.util.Properties prop,
java.lang.String key,
HandlerFactory hf)
It parses a property entry to build or configure a Handler instance.
|
protected Level |
parseLevelProp(java.util.Properties prop,
java.lang.String key,
LevelFactory lef)
It parses a property entry to build or configure a Level instance.
|
protected Level |
parseLevelProp(java.util.Properties prop,
java.lang.String key,
LevelFactory lef,
java.util.Vector currentLevelParse)
It parses a property entry to build or configure a Level instance.
|
protected Logger |
parseLoggerProp(java.util.Properties prop,
java.lang.String key,
LoggerFactory lof,
HandlerFactory hf,
LevelFactory lef)
It parses a property entry to build or configure a Logger instance.
|
protected Logger |
parseLoggerProp(java.util.Properties prop,
java.lang.String key,
MonologFactory mf)
It parses a property entry to build or configure a Logger instance.
|
void |
read(java.util.Properties prop,
LoggerFactory lof,
HandlerFactory hf,
LevelFactory lef) |
void |
read(java.util.Properties prop,
MonologFactory mf) |
static void |
store(java.util.Properties prop,
LoggerFactory lof,
HandlerFactory hf,
LevelFactory lef) |
static void |
store(java.util.Properties prop,
MonologFactory mf) |
void |
write(java.util.Properties prop,
LoggerFactory lof,
HandlerFactory hf,
LevelFactory lef) |
public static final java.lang.String LOGGER_FIELD
public static final java.lang.String ACTIVATION
public static final java.lang.String ADDITIVITY_FIELD
public static final java.lang.String USE_PARENT_FIELD
public static final java.lang.String HANDLER_FIELD
public static final java.lang.String LEVEL_FIELD
public static final java.lang.String TOPIC_FIELD
public static final java.lang.String CLEAN_HANDLERS_FIELD
public static final char DOT
public static final java.lang.String HANDLER_TYPE_ATTRIBUTE
public static final java.lang.String HANDLER_TYPE_ATTRIBUTE_FILE_VALUE
public static final java.lang.String HANDLER_TYPE_ATTRIBUTE_CONSOLE_VALUE
public static final java.lang.String HANDLER_TYPE_ATTRIBUTE_ROLLING_FILE_VALUE
public static final java.lang.String HANDLER_TYPE_ATTRIBUTE_NTEVENT_VALUE
public static final java.lang.String HANDLER_TYPE_ATTRIBUTE_JMX_VALUE
public static boolean debug
protected java.util.Vector loggerCleaned
public static void load(java.util.Properties prop, LoggerFactory lof, HandlerFactory hf, LevelFactory lef) throws java.lang.Exception
java.lang.Exception
public static void load(java.util.Properties prop, MonologFactory mf) throws java.lang.Exception
java.lang.Exception
public static void store(java.util.Properties prop, LoggerFactory lof, HandlerFactory hf, LevelFactory lef) throws java.lang.Exception
java.lang.Exception
public static void store(java.util.Properties prop, MonologFactory mf) throws java.lang.Exception
java.lang.Exception
public void read(java.util.Properties prop, LoggerFactory lof, HandlerFactory hf, LevelFactory lef) throws java.lang.Exception
java.lang.Exception
public void read(java.util.Properties prop, MonologFactory mf) throws java.lang.Exception
java.lang.Exception
public void write(java.util.Properties prop, LoggerFactory lof, HandlerFactory hf, LevelFactory lef) throws java.lang.Exception
java.lang.Exception
protected boolean isDefaultLevel(Level l)
protected Logger parseLoggerProp(java.util.Properties prop, java.lang.String key, LoggerFactory lof, HandlerFactory hf, LevelFactory lef) throws java.lang.Exception
prop
- is the property where the entry is reachable.key
- is the entry keylof
- is the logger factory to use for building a new instance or
fetching existent loggers.hf
- is the handler factory to use for building a new instance or
fetching existent handlers.lef
- is the level factory to use for building a new instance or
fetching existent levels.java.lang.Exception
- when a parameter is null or the entry is malformed.protected Logger parseLoggerProp(java.util.Properties prop, java.lang.String key, MonologFactory mf) throws java.lang.Exception
prop
- is the property where the entry is reachable.key
- is the entry keymf
- is the monolog factory to use for building a new instance or
fetching existent loggers, handlers or levels.java.lang.Exception
- when a parameter is null or the entry is malformed.protected Handler parseHandlerProp(java.util.Properties prop, java.lang.String key, HandlerFactory hf) throws java.lang.Exception
prop
- is the property where the entry is reachable.key
- is the entry keyhf
- is the handler factory to use for building a new instance or
fetching existent handlers.java.lang.Exception
- when a parameter is null or the entry is malformed.protected Level parseLevelProp(java.util.Properties prop, java.lang.String key, LevelFactory lef) throws java.lang.Exception
prop
- is the property where the entry is reachable.key
- is the entry keylef
- is the level factory to use for building a new instance or
fetching existent levels.java.lang.Exception
- when a circular level definition is found or when a
parameter is null or the entry is malformed.protected Level parseLevelProp(java.util.Properties prop, java.lang.String key, LevelFactory lef, java.util.Vector currentLevelParse) throws java.lang.Exception
prop
- is the property where the entry is reachable.key
- is the entry keylef
- is the level factory to use for building a new instance or
fetching existent levels.currentLevelParse
- the list of current level name which are
searched.java.lang.Exception
- when a circular level definition is found or when a
parameter is null.protected java.lang.String[] getDependsLevel(java.lang.String expr)
expr
- is a string which can contain level identifier. The string is
an arithmetic expression which contains number, operator and levels
identifier.protected void cleanOldHandler(TopicalLogger l) throws java.lang.Exception
java.lang.Exception
public void debug(java.lang.String m)