Platform SDK Java 8.5 API Reference

com.genesyslab.platform.logging
Class DefaultLoggerPolicy

java.lang.Object
  extended by com.genesyslab.platform.logging.DefaultLoggerPolicy
All Implemented Interfaces:
LoggerPolicy

public final class DefaultLoggerPolicy
extends java.lang.Object
implements LoggerPolicy


Constructor Summary
DefaultLoggerPolicy()
          Default constructor.
DefaultLoggerPolicy(LogLevel level, LogCategory category, int entryId, boolean overwriteNetworkProtocolProps)
          Constructor.
 
Method Summary
 LogCategory getCategory(java.lang.String message)
          Returns the category for messages.
 int getEntryId(LogLevel level, java.lang.String message)
          Returns the entry ID for the specified level and string message.
 LogLevel getLevel(java.lang.String message)
          Returns the log level for messages.
 boolean overwriteNetworkProtocolProperties()
          If true - the Logger will replace such properties of Logger.getNetworkProtocol() as MessageServerProtocol.ClientHost, MessageServerProtocol.ClientId, MessageServerProtocol.ClientName and MessageServerProtocol.ClientType with values of properties LogConfiguration.ApplicationHost, LogConfiguration.ApplicationId, LogConfiguration.ApplicationName and LogConfiguration.ApplicationType of current logger configuration Logger.CurrentConfiguration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLoggerPolicy

public DefaultLoggerPolicy()
Default constructor. Initializes the instance with next values: for level of message to be returned - LogLevel.Debug for category of message to be returned - LogCategory.Default for id for message to be returned - 9900 (id of next string in common.lms: "9900|DEBUG|GCTI_DEBUG|%s") for OverwriteNetworkProtocolProperties property - 'TRUE'


DefaultLoggerPolicy

public DefaultLoggerPolicy(LogLevel level,
                           LogCategory category,
                           int entryId,
                           boolean overwriteNetworkProtocolProps)
Constructor.

Parameters:
level - the level of message to be returned
category - the category of message to be returned
entryId - the id for message to be returned
overwriteNetworkProtocolProps - Value for OverwriteNetworkProtocolProperties property
Method Detail

getEntryId

public int getEntryId(LogLevel level,
                      java.lang.String message)
Returns the entry ID for the specified level and string message. This ID is always the entryId, as specified in the constructor.

Specified by:
getEntryId in interface LoggerPolicy
Parameters:
level - the level specified
message - string message
Returns:
the Id of message

getCategory

public LogCategory getCategory(java.lang.String message)
Returns the category for messages. This category is always the category, specified in the constructor.

Specified by:
getCategory in interface LoggerPolicy
Parameters:
message - The message for which the category is evaluated
Returns:
The category

getLevel

public LogLevel getLevel(java.lang.String message)
Returns the log level for messages. This log level is always the level, specified in the constructor.

Specified by:
getLevel in interface LoggerPolicy
Parameters:
message - The message for which the category is evaluated
Returns:
The category

overwriteNetworkProtocolProperties

public boolean overwriteNetworkProtocolProperties()
If true - the Logger will replace such properties of Logger.getNetworkProtocol() as MessageServerProtocol.ClientHost, MessageServerProtocol.ClientId, MessageServerProtocol.ClientName and MessageServerProtocol.ClientType with values of properties LogConfiguration.ApplicationHost, LogConfiguration.ApplicationId, LogConfiguration.ApplicationName and LogConfiguration.ApplicationType of current logger configuration Logger.CurrentConfiguration.

Specified by:
overwriteNetworkProtocolProperties in interface LoggerPolicy
Returns:
the overwrite network protocol properties policy

Platform SDK Java 8.5 API Reference

Send comments on this topicTechpubs.webadmin@genesys.com.
Document version: 8.5.302.00
Copyright © 2006–2017 Genesys Telecommunications Laboratories, Inc. All rights reserved.