| java.lang.Object org.objectweb.util.monolog.file.monolog.PropertiesConfAccess
PropertiesConfAccess | public class PropertiesConfAccess implements Serializable(Code) | | This class permits to load and store a monolog configuration. The chooseen
format is java.util.Properties. It also easy to write or load a Properties
from a file. The encoding format is the following:
handler..=
level.=
logger..level=
logger..additivity=
logger..handler.=
logger..topic.=
author: Sebastien Chassande-Barrioz |
Inner Class :class NestedException extends Exception | |
Method Summary | |
protected void | cleanOldHandler(TopicalLogger l) | public void | debug(String m) | protected String[] | getDependsLevel(String expr) It retrieves the list of the referenced levels in the String parameter.
Parameters: expr - is a string which can contain level identifier. | protected boolean | isDefaultLevel(Level l) It checks if the level parameter is a default monolog level. | public static void | load(Properties prop, LoggerFactory lof, HandlerFactory hf, LevelFactory lef) | public static void | load(Properties prop, MonologFactory mf) | protected Handler | parseHandlerProp(Properties prop, String key, HandlerFactory hf) It parses a property entry to build or configure a Handler instance.
Parameters: prop - is the property where the entry is reachable. Parameters: key - is the entry key Parameters: hf - is the handler factory to use for building a new instance orfetching existent handlers. | protected Level | parseLevelProp(Properties prop, String key, LevelFactory lef) It parses a property entry to build or configure a Level instance.
Parameters: prop - is the property where the entry is reachable. Parameters: key - is the entry key Parameters: lef - is the level factory to use for building a new instance orfetching existent levels. | protected Level | parseLevelProp(Properties prop, String key, LevelFactory lef, Vector currentLevelParse) It parses a property entry to build or configure a Level instance. | protected Logger | parseLoggerProp(Properties prop, String key, LoggerFactory lof, HandlerFactory hf, LevelFactory lef) It parses a property entry to build or configure a Logger instance.
Parameters: prop - is the property where the entry is reachable. Parameters: key - is the entry key Parameters: lof - is the logger factory to use for building a new instance orfetching existent loggers. Parameters: hf - is the handler factory to use for building a new instance orfetching existent handlers. Parameters: lef - is the level factory to use for building a new instance orfetching existent levels. | protected Logger | parseLoggerProp(Properties prop, String key, MonologFactory mf) It parses a property entry to build or configure a Logger instance.
Parameters: prop - is the property where the entry is reachable. Parameters: key - is the entry key Parameters: mf - is the monolog factory to use for building a new instance orfetching existent loggers, handlers or levels. | public void | read(Properties prop, LoggerFactory lof, HandlerFactory hf, LevelFactory lef) | public void | read(Properties prop, MonologFactory mf) | public static void | store(Properties prop, LoggerFactory lof, HandlerFactory hf, LevelFactory lef) | public static void | store(Properties prop, MonologFactory mf) | public void | write(Properties prop, LoggerFactory lof, HandlerFactory hf, LevelFactory lef) |
ADDITIVITY_FIELD | final public static String ADDITIVITY_FIELD(Code) | | |
CLEAN_HANDLERS_FIELD | final public static String CLEAN_HANDLERS_FIELD(Code) | | |
DOT | final public static char DOT(Code) | | |
HANDLER_TYPE_ATTRIBUTE | final public static String HANDLER_TYPE_ATTRIBUTE(Code) | | |
HANDLER_TYPE_ATTRIBUTE_CONSOLE_VALUE | final public static String HANDLER_TYPE_ATTRIBUTE_CONSOLE_VALUE(Code) | | |
HANDLER_TYPE_ATTRIBUTE_FILE_VALUE | final public static String HANDLER_TYPE_ATTRIBUTE_FILE_VALUE(Code) | | |
HANDLER_TYPE_ATTRIBUTE_JMX_VALUE | final public static String HANDLER_TYPE_ATTRIBUTE_JMX_VALUE(Code) | | |
HANDLER_TYPE_ATTRIBUTE_NTEVENT_VALUE | final public static String HANDLER_TYPE_ATTRIBUTE_NTEVENT_VALUE(Code) | | |
HANDLER_TYPE_ATTRIBUTE_ROLLING_FILE_VALUE | final public static String HANDLER_TYPE_ATTRIBUTE_ROLLING_FILE_VALUE(Code) | | |
USE_PARENT_FIELD | final public static String USE_PARENT_FIELD(Code) | | |
debug | public static boolean debug(Code) | | |
cleanOldHandler | protected void cleanOldHandler(TopicalLogger l) throws Exception(Code) | | Clear all the handlers associated to a logger which are not defined into
this file
|
getDependsLevel | protected String[] getDependsLevel(String expr)(Code) | | It retrieves the list of the referenced levels in the String parameter.
Parameters: expr - is a string which can contain level identifier. The string isan arithmetic expression which contains number, operator and levelsidentifier. the list of the referenced levels. |
isDefaultLevel | protected boolean isDefaultLevel(Level l)(Code) | | It checks if the level parameter is a default monolog level. The default
monolog levels are the following:
- FATAL
- ERROR
- WARN
- INFO
- DEBUG
|
parseHandlerProp | protected Handler parseHandlerProp(Properties prop, String key, HandlerFactory hf) throws Exception(Code) | | It parses a property entry to build or configure a Handler instance.
Parameters: prop - is the property where the entry is reachable. Parameters: key - is the entry key Parameters: hf - is the handler factory to use for building a new instance orfetching existent handlers. the handler instance which has been built or configured throws: Exception - when a parameter is null or the entry is malformed. |
parseLevelProp | protected Level parseLevelProp(Properties prop, String key, LevelFactory lef) throws Exception(Code) | | It parses a property entry to build or configure a Level instance.
Parameters: prop - is the property where the entry is reachable. Parameters: key - is the entry key Parameters: lef - is the level factory to use for building a new instance orfetching existent levels. the level instance which has been built or configured throws: Exception - when a circular level definition is found or when aparameter is null or the entry is malformed. |
parseLevelProp | protected Level parseLevelProp(Properties prop, String key, LevelFactory lef, Vector currentLevelParse) throws Exception(Code) | | It parses a property entry to build or configure a Level instance.
Parameters: prop - is the property where the entry is reachable. Parameters: key - is the entry key Parameters: lef - is the level factory to use for building a new instance orfetching existent levels. Parameters: currentLevelParse - the list of current level name which aresearched. throws: Exception - when a circular level definition is found or when aparameter is null. |
parseLoggerProp | protected Logger parseLoggerProp(Properties prop, String key, LoggerFactory lof, HandlerFactory hf, LevelFactory lef) throws Exception(Code) | | It parses a property entry to build or configure a Logger instance.
Parameters: prop - is the property where the entry is reachable. Parameters: key - is the entry key Parameters: lof - is the logger factory to use for building a new instance orfetching existent loggers. Parameters: hf - is the handler factory to use for building a new instance orfetching existent handlers. Parameters: lef - is the level factory to use for building a new instance orfetching existent levels. the level instance which has been built or configured throws: Exception - when a parameter is null or the entry is malformed. |
parseLoggerProp | protected Logger parseLoggerProp(Properties prop, String key, MonologFactory mf) throws Exception(Code) | | It parses a property entry to build or configure a Logger instance.
Parameters: prop - is the property where the entry is reachable. Parameters: key - is the entry key Parameters: mf - is the monolog factory to use for building a new instance orfetching existent loggers, handlers or levels. the level instance which has been built or configured throws: Exception - when a parameter is null or the entry is malformed. |
|
|