org.objectweb.util.monolog.api
Interface MonologFactory

All Superinterfaces:
HandlerFactory, LevelFactory, LoggerFactory

public interface MonologFactory
extends LoggerFactory, LevelFactory, HandlerFactory

A monolog factory is a factory for loggers, levels and handlers. It permits also to configure specificaly a wrapper.

Author:
S.Chassande-Barrioz

Field Summary
static String DEFAULT
          This constant represents the default configuration type.
static String LOG_CONFIGURATION_FILE
          This constant can be used to specify the specific configuration file.
static String LOG_CONFIGURATION_FILE_USE_CLASSPATH
          This constant can be used to specify if the configuration file must be searched into the classpath
static String LOG_CONFIGURATION_TYPE
          This constant can be used to specify the type of specific configuration which you need.
static String PROPERTY
          This constant represents the property configuration type.
static String XML
          This constant represents the xml configuration type.
 
Method Summary
 void addLogInfo(Character pattern, LogInfo logInfoProvider)
          Add an extention
 void addMonologFactoryListener(MonologFactoryListener mfl)
          register a listener for the events of this MonologFactory
 void configure(Properties prop)
          This method permits to order to a monolog wrapper to configure the underlying log system.
 LogInfo getLogInfo(Character pattern)
          Gets the provider of the extension
 void removeLogInfo(char pattern)
          Remove an extension
 void removeMonologFactoryListener(MonologFactoryListener mfl)
          forget a listener for the events of this MonologFactory
 
Methods inherited from interface org.objectweb.util.monolog.api.LoggerFactory
getLogger, getLogger, getLoggers, getResourceBundleName, getTopicPrefix, setResourceBundleName
 
Methods inherited from interface org.objectweb.util.monolog.api.LevelFactory
defineLevel, defineLevel, getLevel, getLevel, getLevels, removeLevel
 
Methods inherited from interface org.objectweb.util.monolog.api.HandlerFactory
createHandler, getHandler, getHandlers, removeHandler
 

Field Detail

LOG_CONFIGURATION_TYPE

static final String LOG_CONFIGURATION_TYPE
This constant can be used to specify the type of specific configuration which you need. The possible value are DEFAULT, PROPERTY and XML.

See Also:
Constant Field Values

DEFAULT

static final String DEFAULT
This constant represents the default configuration type. It means that the wrapper must initialized the underlying sub system with the default configuration.

See Also:
Constant Field Values

PROPERTY

static final String PROPERTY
This constant represents the property configuration type. It means that the wrapper must used the LOG_CONFIGURATION_FILE constant to fetch the property file which describes the configuration.

See Also:
Constant Field Values

XML

static final String XML
This constant represents the xml configuration type. It means that the wrapper must used the LOG_CONFIGURATION_FILE constant to fetch the xml file which describes the configuration.

See Also:
Constant Field Values

LOG_CONFIGURATION_FILE

static final String LOG_CONFIGURATION_FILE
This constant can be used to specify the specific configuration file.

See Also:
Constant Field Values

LOG_CONFIGURATION_FILE_USE_CLASSPATH

static final String LOG_CONFIGURATION_FILE_USE_CLASSPATH
This constant can be used to specify if the configuration file must be searched into the classpath

See Also:
Constant Field Values
Method Detail

configure

void configure(Properties prop)
               throws Exception
This method permits to order to a monolog wrapper to configure the underlying log system.

Parameters:
prop - contains properties which describes the way to configure. In particular three properties could be used:
  • LOG_CONFIGURATION_TYPE
  • LOG_CONFIGURATION_FILE
  • LOG_CONFIGURATION_FILE_USE_CLASSPATH

addMonologFactoryListener

void addMonologFactoryListener(MonologFactoryListener mfl)
register a listener for the events of this MonologFactory


removeMonologFactoryListener

void removeMonologFactoryListener(MonologFactoryListener mfl)
forget a listener for the events of this MonologFactory


addLogInfo

void addLogInfo(Character pattern,
                LogInfo logInfoProvider)
                throws Exception
Add an extention

Parameters:
pattern - Character corresponding to the info to add
logInfoProvider - instance of info provider
Throws:
Exception

removeLogInfo

void removeLogInfo(char pattern)
Remove an extension

Parameters:
pattern - log info pattern

getLogInfo

LogInfo getLogInfo(Character pattern)
Gets the provider of the extension

Parameters:
pattern -
Returns:
LogInfo provider


Copyright © 2012 OW2 Consortium. All Rights Reserved.