|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object logging.AbstractLog4jLog
public abstract class AbstractLog4jLog
This is the logging service implementation for compatibility between JAP logging style and log4j logging style. So it should be no problem to use log4j also in JAP.
Constructor Summary | |
---|---|
AbstractLog4jLog()
|
Method Summary | |
---|---|
protected abstract org.apache.log4j.Logger |
getLogger()
|
int |
getLogLevel()
The current log level. |
int |
getLogType()
This method is needed for the implementation of the Log interface, but isn't supported by this class. |
void |
log(int a_level,
int a_type,
java.lang.String a_message)
Logs a message to the infoservice logging output. |
void |
setLogLevel(int level)
Set the log level of this log instance. |
void |
setLogType(int a_type)
This method is needed for the implementation of the Log interface, but isn't supported by this class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractLog4jLog()
Method Detail |
---|
protected abstract org.apache.log4j.Logger getLogger()
public void log(int a_level, int a_type, java.lang.String a_message)
log
in interface Log
a_level
- The level of the message. See logging.LogLevel for more information.
Because we are using log4j, there are done some transformations:
LogLevel.DEBUG -> Level.DEBUG
LogLevel.INFO , LogLevel.NOTICE -> Level.INFO
LogLevel.WARNING -> Level.WARN
LogLevel.ERR , LogLevel.EXCEPTION -> Level.ERROR
LogLevel.ALERT , LogLevel.EMERGENCY -> Level.FATALa_type
- The type of the message, see logging.LogType. This value is ignored,
because the infoservice doesn't use typed messaged, so everything is logged.a_message
- The message to log.public void setLogType(int a_type)
setLogType
in interface Log
a_type
- The debug type (NUL, GUI, NET, THREAD, MISC)public int getLogType()
getLogType
in interface Log
public void setLogLevel(int level)
setLogLevel
in interface Log
a_level
- Changes the log level. Only messages with a equal or higher priority are
logged.public int getLogLevel()
getLogLevel
in interface Log
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |