org.apache.avalon.logging.impl
Class DefaultLoggingCriteria

java.lang.Object
  extended byjava.util.AbstractMap
      extended byjava.util.HashMap
          extended byorg.apache.avalon.util.criteria.Criteria
              extended byorg.apache.avalon.logging.impl.DefaultLoggingCriteria
All Implemented Interfaces:
Cloneable, LoggingCriteria, Map, Serializable

public class DefaultLoggingCriteria
extends Criteria
implements LoggingCriteria

DefaultLoggingCriteria is a class holding the values supplied by a user for application to a LoggingManager factory.

Version:
$Revision: 1.3 $
Author:
Avalon Development Team
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.util.Map
Map.Entry
 
Field Summary
 
Fields inherited from interface org.apache.avalon.logging.provider.LoggingCriteria
LOGGING_BASEDIR_KEY, LOGGING_BOOTSTRAP_KEY, LOGGING_CONFIGURATION_KEY, LOGGING_DEBUG_KEY, LOGGING_INTERVAL_KEY
 
Constructor Summary
DefaultLoggingCriteria(InitialContext context)
          Creation of a new default logging criteria.
 
Method Summary
 File getBaseDirectory()
          Returns the base directory for logging resources.
 Logger getBootstrapLogger()
          Get the bootstrap logging channel
 URL getLoggingConfiguration()
          Returns an external logging system configuration file
 long getUpdateInterval()
          Returns the logging configuration update interval.
 boolean isDebugEnabled()
          Returns debug policy.
 void setBaseDirectory(File dir)
          Set the base directory.
 void setBootstrapLogger(Logger logger)
          Set the bootstrap logging channel
 void setDebugEnabled(boolean mode)
          Set the debug enabled policy
 void setLoggingConfiguration(URL url)
          Set the configuration URL.
 
Methods inherited from class org.apache.avalon.util.criteria.Criteria
get, getKeys, getParameter, getParameters, getValue, put
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, isEmpty, keySet, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
clear, containsKey, containsValue, entrySet, equals, get, hashCode, isEmpty, keySet, put, putAll, remove, size, values
 

Constructor Detail

DefaultLoggingCriteria

public DefaultLoggingCriteria(InitialContext context)
Creation of a new default logging criteria.

Parameters:
context - the initial repository context
Method Detail

setDebugEnabled

public void setDebugEnabled(boolean mode)
Set the debug enabled policy

Specified by:
setDebugEnabled in interface LoggingCriteria
Parameters:
mode - TRUE to enabled debug mode else FALSE

setBootstrapLogger

public void setBootstrapLogger(Logger logger)
Set the bootstrap logging channel

Specified by:
setBootstrapLogger in interface LoggingCriteria
Parameters:
logger - the boootstrap logging channel

setBaseDirectory

public void setBaseDirectory(File dir)
Set the base directory.

Specified by:
setBaseDirectory in interface LoggingCriteria
Parameters:
dir - the base directory

setLoggingConfiguration

public void setLoggingConfiguration(URL url)
Set the configuration URL.

Specified by:
setLoggingConfiguration in interface LoggingCriteria
Parameters:
url - the configuration URL

getBootstrapLogger

public Logger getBootstrapLogger()
Get the bootstrap logging channel

Specified by:
getBootstrapLogger in interface LoggingCriteria
Returns:
the boootstrap logging channel

getBaseDirectory

public File getBaseDirectory()
Returns the base directory for logging resources.

Specified by:
getBaseDirectory in interface LoggingCriteria
Returns:
the base directory

isDebugEnabled

public boolean isDebugEnabled()
Returns debug policy. If TRUE all logging channels will be set to debug level.

Specified by:
isDebugEnabled in interface LoggingCriteria
Returns:
the debug policy

getLoggingConfiguration

public URL getLoggingConfiguration()
Returns an external logging system configuration file

Specified by:
getLoggingConfiguration in interface LoggingCriteria
Returns:
the configuration file (possibly null)

getUpdateInterval

public long getUpdateInterval()
Returns the logging configuration update interval.

Specified by:
getUpdateInterval in interface LoggingCriteria


Copyright © The Apache Software Foundation. All Rights Reserved.