Platform SDK Java 8.5 API Reference

com.genesyslab.platform.commons.log
Class Log

java.lang.Object
  extended by com.genesyslab.platform.commons.log.Log

public final class Log
extends java.lang.Object

Platform SDK Commons Logging system facade.


Field Summary
static java.lang.String LOG_FACTORY_AUTO
           
static java.lang.String LOG_FACTORY_CONSOLE
           
static java.lang.String LOG_FACTORY_JDK
          Deprecated.  
static java.lang.String LOG_FACTORY_JUL
           
static java.lang.String LOG_FACTORY_LOG4J
           
static java.lang.String LOG_FACTORY_LOG4J2
           
static java.lang.String LOG_FACTORY_NONE
           
static java.lang.String LOG_FACTORY_SLF4J
           
static java.lang.String MESSAGE_RECEIVE_LOGGER_NAME
           
static java.lang.String MESSAGE_REQUEST_LOGGER_NAME
           
 
Method Summary
static java.lang.String getCallStackInfo()
          Deprecated. 
static ILogger getDataLogger()
          Deprecated.  
static ILogger getLogger(java.lang.Class clazz)
          Return logger.
static ILogger getLogger(java.lang.String name)
          Return logger.
static ILogger getMessageFilteringLogger()
          Returns separated logger for message filtering.
static ILogger getReceiveLogger(java.lang.String protocolName)
          Returns separated logger for network data receive dumps.
static ILogger getRequestLogger(java.lang.String protocolName)
          Returns separated logger for network data request dumps.
static boolean isMessagesTraceEnabled(java.lang.String protocolName)
           
static void setLoggerFactory(ILoggerFactory factory)
          Sets logger system implementation.
static void setLoggerFactory(java.lang.String factoryName)
          Sets logger system implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG_FACTORY_LOG4J

public static final java.lang.String LOG_FACTORY_LOG4J
See Also:
Constant Field Values

LOG_FACTORY_LOG4J2

public static final java.lang.String LOG_FACTORY_LOG4J2
See Also:
Constant Field Values

LOG_FACTORY_SLF4J

public static final java.lang.String LOG_FACTORY_SLF4J
See Also:
Constant Field Values

LOG_FACTORY_JUL

public static final java.lang.String LOG_FACTORY_JUL
See Also:
Constant Field Values

LOG_FACTORY_JDK

@Deprecated
public static final java.lang.String LOG_FACTORY_JDK
Deprecated. 
See Also:
LOG_FACTORY_JUL, Constant Field Values

LOG_FACTORY_CONSOLE

public static final java.lang.String LOG_FACTORY_CONSOLE
See Also:
Constant Field Values

LOG_FACTORY_AUTO

public static final java.lang.String LOG_FACTORY_AUTO
See Also:
Constant Field Values

LOG_FACTORY_NONE

public static final java.lang.String LOG_FACTORY_NONE
See Also:
Constant Field Values

MESSAGE_RECEIVE_LOGGER_NAME

public static final java.lang.String MESSAGE_RECEIVE_LOGGER_NAME
See Also:
Constant Field Values

MESSAGE_REQUEST_LOGGER_NAME

public static final java.lang.String MESSAGE_REQUEST_LOGGER_NAME
See Also:
Constant Field Values
Method Detail

getLogger

public static ILogger getLogger(java.lang.String name)
Return logger. By default this method returns "silent" logger. It will always return "false" from isXXX() methods and perform no action in logging methods. To choose another implementation of logging system use setLoggerFactory method or "com.genesyslab.platform.commons.log.loggerFactory" system property. It have to contain name of the class which implement com.genesyslab.platform.commons.log.ILoggerFactory interface. One such implementation is com.genesyslab.platform.commons.log.Log4JLoggerFactoryImpl.

Parameters:
name - name of the logger
Returns:
logger for the given name

getMessageFilteringLogger

public static ILogger getMessageFilteringLogger()
Returns separated logger for message filtering.

Returns:
separated logger for message filtering.

getDataLogger

@Deprecated
public static ILogger getDataLogger()
Deprecated. 

Returns separated logger for network data dumps. It is possible to disable or direct big size log records to separated log file. It is useful, for example, in configuration server protocol when big amount of configuration data is been read.

Returns:
logger for data dumping

isMessagesTraceEnabled

public static boolean isMessagesTraceEnabled(java.lang.String protocolName)

getRequestLogger

public static ILogger getRequestLogger(java.lang.String protocolName)
Returns separated logger for network data request dumps. It is possible to disable or direct big size log records to separated log file. It is useful, for example, in configuration server protocol when big amount of configuration data is been requested.

Parameters:
protocolName - name of protocol for optional logging or filtering.
Returns:
logger for data dumping

getReceiveLogger

public static ILogger getReceiveLogger(java.lang.String protocolName)
Returns separated logger for network data receive dumps. It is possible to disable or direct big size log records to separated log file. It is useful, for example, in configuration server protocol when big amount of configuration data is been read.

Parameters:
protocolName - name of protocol for optional logging or filtering.
Returns:
logger for data dumping

getLogger

public static ILogger getLogger(java.lang.Class clazz)
Return logger. By default this method returns "silent" logger. It will always return "false" from isXXX() methods and perform no action in logging methods. To choose another implementation of logging system use setLoggerFactory method or "com.genesyslab.platform.commons.log.loggerFactory" system property. It have to contain name of the class which implement com.genesyslab.platform.commons.log.ILoggerFactory interface. One such implementation is com.genesyslab.platform.commons.log.Log4JLoggerFactoryImpl.

Parameters:
clazz - class to create name of the logger from
Returns:
logger for the given class

setLoggerFactory

public static void setLoggerFactory(java.lang.String factoryName)
Sets logger system implementation.

Parameters:
factoryName - class name or alias name of loggers factory
Throws:
java.lang.IllegalArgumentException - if logger factory instance creation failed
See Also:
PsdkCustomization.PsdkOption#PsdkLoggerFactory, LOG_FACTORY_CONSOLE, LOG_FACTORY_JUL, LOG_FACTORY_LOG4J, LOG_FACTORY_SLF4J, LOG_FACTORY_LOG4J2, LOG_FACTORY_AUTO, LOG_FACTORY_NONE

setLoggerFactory

public static void setLoggerFactory(ILoggerFactory factory)
Sets logger system implementation.

Parameters:
factory - factory that creates loggers

getCallStackInfo

@Deprecated
public static java.lang.String getCallStackInfo()
Deprecated. 


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.