Package org.apache.openjpa.lib.log
Class LogFactoryImpl.LogImpl
java.lang.Object
org.apache.openjpa.lib.log.AbstractLog
org.apache.openjpa.lib.log.LogFactoryImpl.LogImpl
- All Implemented Interfaces:
Log
- Enclosing class:
- LogFactoryImpl
A simple implementation of the
Log
interface. Writes
output to stderr.-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
formatMessage
(short level, String message, Throwable t) Convertmessage
into a string ready to be written to the log.short
getLevel()
protected boolean
isEnabled
(short level) Check to see if the specified logging level is enabled.protected void
Send the specified log message to the handler.void
setChannel
(String val) void
setLevel
(short val) Methods inherited from class org.apache.openjpa.lib.log.AbstractLog
error, error, fatal, fatal, getStackTrace, info, info, isErrorEnabled, isFatalEnabled, isInfoEnabled, isTraceEnabled, isWarnEnabled, trace, trace, warn, warn
-
Constructor Details
-
LogImpl
public LogImpl()
-
-
Method Details
-
isEnabled
protected boolean isEnabled(short level) Description copied from class:AbstractLog
Check to see if the specified logging level is enabled.- Specified by:
isEnabled
in classAbstractLog
-
log
Description copied from class:AbstractLog
Send the specified log message to the handler.- Specified by:
log
in classAbstractLog
- Parameters:
level
- the level of the log messagemessage
- the message to sendt
- the Throwable, or null if this is not an error
-
formatMessage
Convertmessage
into a string ready to be written to the log.- Parameters:
t
- may be null
-
setChannel
-
getChannel
-
setLevel
public void setLevel(short val) -
getLevel
public short getLevel()
-