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.- Author:
- Patrick Linskey
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringformatMessage(short level, String message, Throwable t) Convertmessageinto a string ready to be written to the log.shortgetLevel()protected booleanisEnabled(short level) Check to see if the specified logging level is enabled.protected voidSend the specified log message to the handler.voidsetChannel(String val) voidsetLevel(short val) Methods inherited from class 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:AbstractLogCheck to see if the specified logging level is enabled.- Specified by:
isEnabledin classAbstractLog
-
log
Description copied from class:AbstractLogSend the specified log message to the handler.- Specified by:
login classAbstractLog- Parameters:
level- the level of the log messagemessage- the message to sendt- the Throwable, or null if this is not an error
-
formatMessage
-
setChannel
-
getChannel
-
setLevel
public void setLevel(short val) -
getLevel
public short getLevel()
-