|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.genesyslab.platform.commons.log.AbstractLogEnabled
com.genesyslab.platform.logging.runtime.AbstractLogger
public abstract class AbstractLogger
Constructor Summary | |
---|---|
AbstractLogger(java.lang.String name)
|
Method Summary | |
---|---|
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. |
Methods inherited from class com.genesyslab.platform.commons.log.AbstractLogEnabled |
---|
enableLogging, getLogger, onEnableLogging |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractLogger(java.lang.String name) throws LoggerException
LoggerException
Method Detail |
---|
public java.lang.String getName()
LoggerEx
getName
in interface LoggerEx
public LoggerEx createChildLoggerEx(java.lang.String name) throws LoggerException
LoggerEx
createChildLoggerEx
in interface LoggerEx
name
- The Subname of this logger
LoggerException
public ILogger createChildLogger(java.lang.String name)
ILogger
[this-logger-name].[child-name]
".
createChildLogger
in interface ILogger
name
- the child name for the new logger
public RootLogger getRootLogger()
LoggerEx
getRootLogger
in interface LoggerEx
protected abstract InternalRootLogger getInternalLogger()
public void debug(java.lang.Object message)
debug
in interface ILogger
message
- The Message.public void debug(java.lang.Object message, java.lang.Throwable exception)
debug
in interface ILogger
message
- The Message.exception
- The 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)
info
in interface ILogger
message
- The Message.public void info(java.lang.Object message, java.lang.Throwable exception)
info
in interface ILogger
message
- The Message.exception
- The 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)
warn
in interface ILogger
message
- The message.public void warn(java.lang.Object message, java.lang.Throwable exception)
warn
in interface ILogger
message
- The Message.exception
- The 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)
error
in interface ILogger
message
- The message.public void error(java.lang.Object message, java.lang.Throwable exception)
error
in interface ILogger
message
- The Message.exception
- The 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()
isDebug
in interface ILogger
public boolean isError()
isError
in interface ILogger
public boolean isFatalError()
isFatalError
in interface ILogger
public boolean isInfo()
isInfo
in interface ILogger
public boolean isWarn()
isWarn
in interface ILogger
public void write(int messageId, java.lang.Object[] args)
write
in interface LoggerEx
messageId
- The of message to be writtenargs
- Additional argspublic 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.
write
in interface LoggerEx
entry
- The LogEntry which contains info about messagepublic boolean canLogMessage(LogLevel level)
LoggerEx
canLogMessage
in interface LoggerEx
level
- log level to check
|
Platform SDK Java 8.5 API Reference | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |