com.metamatrix.admin.api.objects
Interface LogConfiguration

All Superinterfaces:
AdminObject
All Known Implementing Classes:
MMLogConfiguration

public interface LogConfiguration
extends AdminObject

The LogConfiguration describes the current configuration of the system logger.

The log configuration is used to filter on log contexts (components) and log levels (severity).

Since:
4.3

Field Summary
static java.lang.String CONTEXT_DELIMETER
          This String should separate each of the contexts in the String value for the property LOG_CONTEXT_PROPERTY_NAME.
static int CRITICAL
          Message level value that specifies that critical messages are to be recorded.
static java.lang.String CTX_ALL
          A flag that specifies ALL logging contexts.
static int DETAIL
          Message level value that specifies that detailed, information, warning, error and critical messages are to be recorded.
static int ERROR
          Message level value that specifies that error messages and critical messages are to be recorded.
static int INFO
          Message level value that specifies that information, warning, error and critical messages are to be recorded.
static java.lang.String LOG_CONTEXT_PROPERTY_NAME
          The name of the System property that contains the set of comma-separated context names for messages not to be recorded.
static java.lang.String LOG_LEVEL_PROPERTY_NAME
          The name of the System property that contains the message level for the LogManager.
static int NONE
          Message level value that specifies that no messages are to be recorded.
static int TRACE
          Message level value that specifies that all messages are to be recorded.
static int WARNING
          Message level value that specifies that warning, error and critical messages are to be recorded.
 
Fields inherited from interface com.metamatrix.admin.api.objects.AdminObject
DELIMITER, DELIMITER_CHAR, ESCAPED_DELIMITER, ESCAPED_WILDCARD, WILDCARD
 
Method Summary
 java.util.Set getDiscardedContexts()
          Obtain the set of contexts for messages that are to be discarded.
 java.util.Set getIncludedContexts()
          Obtain the set of message contexts that are currently used.
 int getLogLevel()
          Get the current configured Log Level TODO: An int log level is of little use to clients.
 void setDiscardedContexts(java.util.Set contexts)
          Direct the log configuration to discard the given contexts and not record them.
 void setIncludedContexts(java.util.Set contexts)
          Direct the log configuration to record only these contexts.
 void setLogLevel(int logLevel)
          Set the Log Level Note: Must call setLogConfiguration(LogConfiguration) for log level to take affect on the server.
 
Methods inherited from interface com.metamatrix.admin.api.objects.AdminObject
getIdentifier, getName, getProperties, getPropertyValue
 

Field Detail

NONE

static final int NONE
Message level value that specifies that no messages are to be recorded.

See Also:
Constant Field Values

CRITICAL

static final int CRITICAL
Message level value that specifies that critical messages are to be recorded.

See Also:
Constant Field Values

ERROR

static final int ERROR
Message level value that specifies that error messages and critical messages are to be recorded.

See Also:
Constant Field Values

WARNING

static final int WARNING
Message level value that specifies that warning, error and critical messages are to be recorded.

See Also:
Constant Field Values

INFO

static final int INFO
Message level value that specifies that information, warning, error and critical messages are to be recorded.

See Also:
Constant Field Values

DETAIL

static final int DETAIL
Message level value that specifies that detailed, information, warning, error and critical messages are to be recorded.

See Also:
Constant Field Values

TRACE

static final int TRACE
Message level value that specifies that all messages are to be recorded.

See Also:
Constant Field Values

CTX_ALL

static final java.lang.String CTX_ALL
A flag that specifies ALL logging contexts. Can be used in specifying included or discarded logging contexts. If this value exists among other logging contexts in the included or discarded sets, all other values are ignored. If this value is contained in both sets, no change in the logging configuration will take place.

See Also:
Constant Field Values

LOG_LEVEL_PROPERTY_NAME

static final java.lang.String LOG_LEVEL_PROPERTY_NAME
The name of the System property that contains the message level for the LogManager. This is an optional property that defaults to '3'.

See Also:
Constant Field Values

LOG_CONTEXT_PROPERTY_NAME

static final java.lang.String LOG_CONTEXT_PROPERTY_NAME

The name of the System property that contains the set of comma-separated context names for messages not to be recorded. A message context is simply some string that identifies something about the component that generates the message. The value for the contexts is application specific.

This is an optional property that defaults to no contexts (i.e., messages with any context are recorded).

See Also:
Constant Field Values

CONTEXT_DELIMETER

static final java.lang.String CONTEXT_DELIMETER
This String should separate each of the contexts in the String value for the property LOG_CONTEXT_PROPERTY_NAME. For example, if this delimiter were a comma, the value for the property might be something like "CONFIG,QUERY,CONFIGURATION_ADAPTER".

See Also:
Constant Field Values
Method Detail

getLogLevel

int getLogLevel()
Get the current configured Log Level TODO: An int log level is of little use to clients. Need to get log level descriptions too.

Returns:
int value
Since:
4.3
See Also:
MessageLevel

getIncludedContexts

java.util.Set getIncludedContexts()
Obtain the set of message contexts that are currently used.

Returns:
the unmodifiable set of context Strings; never null

getDiscardedContexts

java.util.Set getDiscardedContexts()
Obtain the set of contexts for messages that are to be discarded. If this method returns an empty set, then messages in all contexts are being recorded; if not empty, then messages with a context in the returned set are discarded and messages for all other contexts recorded.

Returns:
the set of contexts for messages that are to be discarded

setLogLevel

void setLogLevel(int logLevel)
Set the Log Level Note: Must call setLogConfiguration(LogConfiguration) for log level to take affect on the server.

Parameters:
logLevel - The logLevel to set.
Since:
4.3

setDiscardedContexts

void setDiscardedContexts(java.util.Set contexts)
Direct the log configuration to discard the given contexts and not record them. Note: Must call setLogConfiguration(LogConfiguration) for log level to take affect on the server.

Parameters:
contexts - the Set of contexts that should be discarded.

setIncludedContexts

void setIncludedContexts(java.util.Set contexts)
Direct the log configuration to record only these contexts. Note: Must call setLogConfiguration(LogConfiguration) for log level to take affect on the server.

Parameters:
contexts - the Set of contexts that should be included.


Copyright © 2009. All Rights Reserved.