com.metamatrix.common.log
Class LogConfigurationImpl

java.lang.Object
  extended by com.metamatrix.common.log.LogConfigurationImpl
All Implemented Interfaces:
LogConfiguration, java.io.Serializable

public class LogConfigurationImpl
extends java.lang.Object
implements LogConfiguration, java.io.Serializable

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.metamatrix.common.log.LogConfiguration
ROOT_CONTEXT
 
Constructor Summary
LogConfigurationImpl()
           
LogConfigurationImpl(java.util.Map<java.lang.String,java.lang.Integer> contextMap)
           
 
Method Summary
 java.util.Set<java.lang.String> getContexts()
          Obtain the set of message contexts that are currently used.
 int getLogLevel(java.lang.String context)
          Get the current configured Log Level for supplied context
 boolean isEnabled(java.lang.String context, int msgLevel)
          Is the logging for the given context at the specified message level enabled.
static LogConfiguration makeCopy(LogConfiguration config)
           
 void setLogLevel(java.lang.String context, int logLevel)
          Set the Log Level Note: Must call setLogConfiguration(LogConfiguration) for log level to take affect on the server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogConfigurationImpl

public LogConfigurationImpl()

LogConfigurationImpl

public LogConfigurationImpl(java.util.Map<java.lang.String,java.lang.Integer> contextMap)
Method Detail

getContexts

public java.util.Set<java.lang.String> getContexts()
Description copied from interface: LogConfiguration
Obtain the set of message contexts that are currently used.

Specified by:
getContexts in interface LogConfiguration
Returns:
the unmodifiable set of context Strings; never null

getLogLevel

public int getLogLevel(java.lang.String context)
Description copied from interface: LogConfiguration
Get the current configured Log Level for supplied context

Specified by:
getLogLevel in interface LogConfiguration
Returns:
int value
See Also:
MessageLevel

setLogLevel

public void setLogLevel(java.lang.String context,
                        int logLevel)
Description copied from interface: LogConfiguration
Set the Log Level Note: Must call setLogConfiguration(LogConfiguration) for log level to take affect on the server.

Specified by:
setLogLevel in interface LogConfiguration
Parameters:
context - log context name
logLevel - The logLevel to set.

isEnabled

public boolean isEnabled(java.lang.String context,
                         int msgLevel)
Description copied from interface: LogConfiguration
Is the logging for the given context at the specified message level enabled.

Specified by:
isEnabled in interface LogConfiguration
Returns:

makeCopy

public static LogConfiguration makeCopy(LogConfiguration config)


Copyright © 2009. All Rights Reserved.