Platform SDK Java 8.5 API Reference

com.genesyslab.platform.commons.log
Class AbstractLogger

java.lang.Object
  extended by com.genesyslab.platform.commons.log.AbstractLogger
All Implemented Interfaces:
ILogger
Direct Known Subclasses:
AbstractLmsEventLogger, JavaUtilLoggerImpl, Log4J2LoggerImpl, Log4JLoggerImpl, NullLoggerImpl, SimpleLoggerImpl

public abstract class AbstractLogger
extends java.lang.Object
implements ILogger

Base class for loggers


Nested Class Summary
protected static class AbstractLogger.Level
           
 
Constructor Summary
AbstractLogger()
           
 
Method Summary
 void debug(java.lang.Object message)
          Logs a message at the DEBUG level.
 void debug(java.lang.Object message, java.lang.Throwable e)
          Logs a message at the DEBUG level including the stack trace of the Throwable thr passed as parameter.
 void debugFormat(java.lang.String message, java.lang.Object args)
          Logs formatted debug message with optional arguments.
 void error(java.lang.Object message)
          Logs a message at the ERROR level.
 void error(java.lang.Object message, java.lang.Throwable e)
          Logs a message at the ERROR level including the stack trace of the Throwable thr passed as parameter.
 void errorFormat(java.lang.String message, java.lang.Object args)
          Logs a message at the ERROR level.
To format log messages PSDK uses MessageFormat class.
Quick examples on the rules of formatting:
 void fatalError(java.lang.Object message)
          Logs a message object with the FATAL ERROR level.
 void fatalError(java.lang.Object message, java.lang.Throwable e)
          Logs a message at the FATAL ERROR level including the stack trace of the Throwable thr passed as parameter.
 void fatalErrorFormat(java.lang.String message, java.lang.Object args)
          Logs a message at the FATAL ERROR level.
To format log messages PSDK uses MessageFormat class.
Quick examples on the rules of formatting:
protected static java.lang.String formatMessage(java.lang.String format, java.lang.Object args)
           
 void info(java.lang.Object message)
          Logs a message at the INFO level.
 void info(java.lang.Object message, java.lang.Throwable e)
          Logs a message at the INFO level including the stack trace of the Throwable thr passed as parameter.
 void infoFormat(java.lang.String message, java.lang.Object args)
          Logs a message at the INFO level.
To format log messages PSDK uses MessageFormat class.
Quick examples on the rules of formatting:
protected abstract  void log(java.lang.Object message, java.lang.Throwable e, AbstractLogger.Level level)
           
protected abstract  void logArgs(java.lang.String message, java.lang.Object args, AbstractLogger.Level level)
           
 void warn(java.lang.Object message)
          Logs a message at the WARNING level.
 void warn(java.lang.Object message, java.lang.Throwable e)
          Logs a message at the WARNING level including the stack trace of the Throwable thr passed as parameter.
 void warnFormat(java.lang.String message, java.lang.Object args)
          Logs a message at the WARNING level.
To format log messages PSDK uses MessageFormat class.
Quick examples on the rules of formatting:
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.genesyslab.platform.commons.log.ILogger
createChildLogger, isDebug, isError, isFatalError, isInfo, isWarn
 

Constructor Detail

AbstractLogger

public AbstractLogger()
Method Detail

debug

public void debug(java.lang.Object message)
Description copied from interface: ILogger
Logs a message at the DEBUG level.

Specified by:
debug in interface ILogger
Parameters:
message - the message object to log.

debug

public void debug(java.lang.Object message,
                  java.lang.Throwable e)
Description copied from interface: ILogger
Logs a message at the DEBUG level including the stack trace of the Throwable thr passed as parameter.

Specified by:
debug in interface ILogger
Parameters:
message - the message object to log.
e - the exception to log, including its stack trace.

debugFormat

public void debugFormat(java.lang.String message,
                        java.lang.Object args)
Description copied from interface: ILogger
Logs formatted debug message with optional arguments. To format log messages PSDK uses MessageFormat class.
Quick examples on the rules of formatting:
 log.debugFormat("Value is ''{0}''", new Integer(1));
 log.debugFormat("Value for index: [{0}] = {1}", new Object[] {ind, val});

Specified by:
debugFormat in interface ILogger
Parameters:
message - message with format tags
args - arguments for format
See Also:
MessageFormat

info

public void info(java.lang.Object message)
Description copied from interface: ILogger
Logs a message at the INFO level.

Specified by:
info in interface ILogger
Parameters:
message - the message object to log.

info

public void info(java.lang.Object message,
                 java.lang.Throwable e)
Description copied from interface: ILogger
Logs a message at the INFO level including the stack trace of the Throwable thr passed as parameter.

Specified by:
info in interface ILogger
Parameters:
message - the message object to log.
e - the exception to log, including its stack trace.

infoFormat

public void infoFormat(java.lang.String message,
                       java.lang.Object args)
Description copied from interface: ILogger
Logs a message at the INFO level.
To format log messages PSDK uses MessageFormat class.
Quick examples on the rules of formatting:
 log.infoFormat("Value is ''{0}''", new Integer(1));
 log.infoFormat("Value for index: [{0}] = {1}", new Object[] {ind, val});

Specified by:
infoFormat in interface ILogger
Parameters:
message - the message to log.
args - parameters to the message.
See Also:
MessageFormat

error

public void error(java.lang.Object message)
Description copied from interface: ILogger
Logs a message at the ERROR level.

Specified by:
error in interface ILogger
Parameters:
message - the message object to log.

error

public void error(java.lang.Object message,
                  java.lang.Throwable e)
Description copied from interface: ILogger
Logs a message at the ERROR level including the stack trace of the Throwable thr passed as parameter.

Specified by:
error in interface ILogger
Parameters:
message - the message object to log.
e - the exception to log, including its stack trace.

errorFormat

public void errorFormat(java.lang.String message,
                        java.lang.Object args)
Description copied from interface: ILogger
Logs a message at the ERROR level.
To format log messages PSDK uses MessageFormat class.
Quick examples on the rules of formatting:
 log.errorFormat("Value is ''{0}''", new Integer(1));
 log.errorFormat("Value for index: [{0}] = {1}", new Object[] {ind, val});

Specified by:
errorFormat in interface ILogger
Parameters:
message - the message to log.
args - parameters to the message.
See Also:
MessageFormat

warn

public void warn(java.lang.Object message)
Description copied from interface: ILogger
Logs a message at the WARNING level.

Specified by:
warn in interface ILogger
Parameters:
message - the message object to log.

warn

public void warn(java.lang.Object message,
                 java.lang.Throwable e)
Description copied from interface: ILogger
Logs a message at the WARNING level including the stack trace of the Throwable thr passed as parameter.

Specified by:
warn in interface ILogger
Parameters:
message - the message object to log.
e - the exception to log, including its stack trace.

warnFormat

public void warnFormat(java.lang.String message,
                       java.lang.Object args)
Description copied from interface: ILogger
Logs a message at the WARNING level.
To format log messages PSDK uses MessageFormat class.
Quick examples on the rules of formatting:
 log.warnFormat("Value is ''{0}''", new Integer(1));
 log.warnFormat("Value for index: [{0}] = {1}", new Object[] {ind, val});

Specified by:
warnFormat in interface ILogger
Parameters:
message - the message to log.
args - parameters to the message.
See Also:
MessageFormat

fatalError

public void fatalError(java.lang.Object message)
Description copied from interface: ILogger
Logs a message object with the FATAL ERROR level.

Note: Some of PSDK supported logging frameworks (namely "Slf4J" and "java.util.logging") do not support FATAL ERROR messages level.
So, in Slf4J logging adapter PSDK marks such messages with "PSDK_FATAL_MESSAGE" marker.
And in java.util.logging adapter this level is processed as ERROR (SEVERE).

Specified by:
fatalError in interface ILogger
Parameters:
message - the message to log.

fatalError

public void fatalError(java.lang.Object message,
                       java.lang.Throwable e)
Description copied from interface: ILogger
Logs a message at the FATAL ERROR level including the stack trace of the Throwable thr passed as parameter.

Note: Some of PSDK supported logging frameworks (namely "Slf4J" and "java.util.logging") do not support FATAL ERROR messages level.
So, in Slf4J logging adapter PSDK marks such messages with "PSDK_FATAL_MESSAGE" marker.
And in java.util.logging adapter this level is processed as ERROR (SEVERE).

Specified by:
fatalError in interface ILogger
Parameters:
message - the message object to log.
e - the exception to log, including its stack trace.

fatalErrorFormat

public void fatalErrorFormat(java.lang.String message,
                             java.lang.Object args)
Description copied from interface: ILogger
Logs a message at the FATAL ERROR level.
To format log messages PSDK uses MessageFormat class.
Quick examples on the rules of formatting:
 log.fatalErrorFormat("Value is ''{0}''", new Integer(1));
 log.fatalErrorFormat("Value for index: [{0}] = {1}", new Object[] {ind, val});

Note: Some of PSDK supported logging frameworks (namely "Slf4J" and "java.util.logging") do not support FATAL ERROR messages level.
So, in Slf4J logging adapter PSDK marks such messages with "PSDK_FATAL_MESSAGE" marker.
And in java.util.logging adapter this level is processed as ERROR (SEVERE).

Specified by:
fatalErrorFormat in interface ILogger
Parameters:
message - the message to log.
args - parameters to the message.
See Also:
MessageFormat

log

protected abstract void log(java.lang.Object message,
                            java.lang.Throwable e,
                            AbstractLogger.Level level)

logArgs

protected abstract void logArgs(java.lang.String message,
                                java.lang.Object args,
                                AbstractLogger.Level level)

formatMessage

protected static java.lang.String formatMessage(java.lang.String format,
                                                java.lang.Object args)

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.