ILogEnabled
, ILogger
, LoggerEx
Logger
, LoggerWraper
public abstract class AbstractLogger extends AbstractLogEnabled implements LoggerEx
Constructor | Description |
---|---|
AbstractLogger(java.lang.String name) |
Modifier and Type | Method | Description |
---|---|---|
boolean |
canLogMessage(LogLevel level) |
Determines if given level is enough for logging in current configuration.
|
ILogger |
createChildLogger(java.lang.String name) |
Creates new child logger.
|
LoggerEx |
createChildLoggerEx(java.lang.String name) |
Creates a new child logger.
|
void |
debug(java.lang.Object message) |
Logs a debug message.
|
void |
debug(java.lang.Object message,
java.lang.Throwable exception) |
Logs a debug message.
|
void |
debugFormat(java.lang.String format,
java.lang.Object args) |
Logs a debug message.
|
void |
error(java.lang.Object message) |
Logs an error message.
|
void |
error(java.lang.Object message,
java.lang.Throwable exception) |
Logs an error message.
|
void |
errorFormat(java.lang.String format,
java.lang.Object args) |
Logs an error message.
|
void |
fatalError(java.lang.Object message) |
Logs a fatal error message.
|
void |
fatalError(java.lang.Object message,
java.lang.Throwable exception) |
Logs a fatal error message.
|
void |
fatalErrorFormat(java.lang.String format,
java.lang.Object args) |
Logs a fatal error message.
|
protected abstract InternalRootLogger |
getInternalLogger() |
|
java.lang.String |
getName() |
Returns name of the logger
|
RootLogger |
getRootLogger() |
Gets instance of root logger.
|
void |
info(java.lang.Object message) |
Logs an info message.
|
void |
info(java.lang.Object message,
java.lang.Throwable exception) |
Logs an info message.
|
void |
infoFormat(java.lang.String format,
java.lang.Object args) |
Logs an info message.
|
boolean |
isDebug() |
Determines if messages of priority "debug" will be logged.
|
boolean |
isError() |
Determines if messages of priority "error" will be logged.
|
boolean |
isFatalError() |
Determines if messages of priority "fatalError" will be logged.
|
boolean |
isInfo() |
Determines if messages of priority "info" will be logged.
|
boolean |
isWarn() |
Determines if messages of priority "warn" will be logged.
|
void |
warn(java.lang.Object message) |
Logs a warn message.
|
void |
warn(java.lang.Object message,
java.lang.Throwable exception) |
Logs a warn message.
|
void |
warnFormat(java.lang.String format,
java.lang.Object args) |
Logs a warn message.
|
void |
write(int messageId,
java.lang.Object[] args) |
This method extracts the template for formatting message (by messageId)
from lms file(s) and creates the message using the info from template.
|
void |
write(LogEntry entry) |
Writes the passed
LogEntry to outputs. |
enableLogging, getLogger, onEnableLogging
public AbstractLogger(java.lang.String name) throws LoggerException
LoggerException
public java.lang.String getName()
LoggerEx
public LoggerEx createChildLoggerEx(java.lang.String name) throws LoggerException
LoggerEx
createChildLoggerEx
in interface LoggerEx
name
- The Subname of this loggerLoggerException
public ILogger createChildLogger(java.lang.String name)
ILogger
[this-logger-name].[child-name]
".createChildLogger
in interface ILogger
name
- the child name for the new loggerpublic RootLogger getRootLogger()
LoggerEx
getRootLogger
in interface LoggerEx
protected abstract InternalRootLogger getInternalLogger()
public void debug(java.lang.Object message)
public void debug(java.lang.Object message, java.lang.Throwable exception)
public void debugFormat(java.lang.String format, java.lang.Object args)
debugFormat
in interface ILogger
format
- Message format.args
- Array of objects to write using format.MessageFormat
public void info(java.lang.Object message)
public void info(java.lang.Object message, java.lang.Throwable exception)
public void infoFormat(java.lang.String format, java.lang.Object args)
infoFormat
in interface ILogger
format
- Message format.args
- Array of objects to write using format.MessageFormat
public void warn(java.lang.Object message)
public void warn(java.lang.Object message, java.lang.Throwable exception)
public void warnFormat(java.lang.String format, java.lang.Object args)
warnFormat
in interface ILogger
format
- Message format.args
- Array of objects to write using format.MessageFormat
public void error(java.lang.Object message)
public void error(java.lang.Object message, java.lang.Throwable exception)
public void errorFormat(java.lang.String format, java.lang.Object args)
errorFormat
in interface ILogger
format
- Message format.args
- Array of objects to write using format.MessageFormat
public void fatalError(java.lang.Object message)
fatalError
in interface ILogger
message
- The message.public void fatalError(java.lang.Object message, java.lang.Throwable exception)
fatalError
in interface ILogger
message
- The Message.exception
- The Exception.public void fatalErrorFormat(java.lang.String format, java.lang.Object args)
fatalErrorFormat
in interface ILogger
format
- Message format.args
- Array of objects to write using format.MessageFormat
public boolean isDebug()
public boolean isError()
public boolean isFatalError()
isFatalError
in interface ILogger
public boolean isInfo()
public boolean isWarn()
public void write(int messageId, java.lang.Object[] args)
public void write(LogEntry entry)
LogEntry
to outputs. Please note: this
method does not formats meesages (i.e. no extracting of template from the
lms file and formatting the string message is done) - all info about
message is read from entry
.
If lms-based formatting is needed - please, use the overload write(int, Object[])
"/>.
The associated info (LogCategory
, LogLevel
and so on) is read from entry
if message id is greater
than 0 and from LoggerPolicy
if message id is less or equal
to 0.
In any case - the time of message is converted to time, defined by logger
settings. See TimeUsage
for more info.public boolean canLogMessage(LogLevel level)
LoggerEx
canLogMessage
in interface LoggerEx
level
- log level to checkSend comments on this topicTechpubs.webadmin@genesys.com.
Document version: 9.0.006.00
Copyright © 2006–2019 Genesys Telecommunications Laboratories, Inc. All rights reserved.