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
public class LogFactoryImpl.LogImpl extends AbstractLog
A simple implementation of theLoginterface. Writes output to stderr.
-
-
Constructor Summary
Constructors Constructor Description LogImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected java.lang.StringformatMessage(short level, java.lang.String message, java.lang.Throwable t)Convertmessageinto a string ready to be written to the log.java.lang.StringgetChannel()shortgetLevel()protected booleanisEnabled(short level)Check to see if the specified logging level is enabled.protected voidlog(short level, java.lang.String message, java.lang.Throwable t)Send the specified log message to the handler.voidsetChannel(java.lang.String val)voidsetLevel(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
-
-
-
-
Method Detail
-
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
protected void log(short level, java.lang.String message, java.lang.Throwable t)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
protected java.lang.String formatMessage(short level, java.lang.String message, java.lang.Throwable t)Convertmessageinto a string ready to be written to the log.- Parameters:
t- may be null
-
setChannel
public void setChannel(java.lang.String val)
-
getChannel
public java.lang.String getChannel()
-
setLevel
public void setLevel(short val)
-
getLevel
public short getLevel()
-
-