Package org.apache.openjpa.lib.log
Class AbstractLog
java.lang.Object
org.apache.openjpa.lib.log.AbstractLog
- All Implemented Interfaces:
Log
- Direct Known Subclasses:
LogFactoryImpl.LogImpl
A simple implementation of the
Log interface. Writes
output to stdout.- Author:
- Patrick Linskey
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidWrite out a log message at theLog.ERRORlevel with the stringification ofoas the body of the message, also outputtingtto the log.voidWrite out a log message at theLog.ERRORlevel with the stringification ofoas the body of the message, also outputtingtto the log.voidWrite out a log message at theLog.FATALlevel with the stringification ofoas the body of the message, also outputtingtto the log.voidWrite out a log message at theLog.FATALlevel with the stringification ofoas the body of the message, also outputtingtto the log.protected static StringUtility method to obtain a stack trace as a String.voidWrite out a log message at theLog.INFOlevel with the stringification ofoas the body of the message, also outputtingtto the log.voidWrite out a log message at theLog.INFOlevel with the stringification ofoas the body of the message, also outputtingtto the log.protected abstract booleanisEnabled(short level) Check to see if the specified logging level is enabled.booleanReturns if theLog.ERRORlog level is enabled.booleanReturns if theLog.FATALlog level is enabled.booleanReturns if theLog.INFOlog level is enabled.booleanReturns if theLog.TRACElog level is enabled.booleanReturns if theLog.WARNlog level is enabled.protected abstract voidSend the specified log message to the handler.voidWrite out a log message at theLog.TRACElevel with the stringification ofoas the body of the message.voidWrite out a log message at theLog.TRACElevel with the stringification ofoas the body of the message, also outputtingtto the log.voidWrite out a log message at theLog.WARNlevel with the stringification ofoas the body of the message, also outputtingtto the log.voidWrite out a log message at theLog.WARNlevel with the stringification ofoas the body of the message, also outputtingtto the log.
-
Constructor Details
-
AbstractLog
public AbstractLog()
-
-
Method Details
-
isEnabled
protected abstract boolean isEnabled(short level) Check to see if the specified logging level is enabled. -
log
Send the specified log message to the handler.- Parameters:
level- the level of the log messagemessage- the message to sendt- the Throwable, or null if this is not an error
-
isTraceEnabled
public boolean isTraceEnabled()Description copied from interface:LogReturns if theLog.TRACElog level is enabled.- Specified by:
isTraceEnabledin interfaceLog
-
isInfoEnabled
public boolean isInfoEnabled()Description copied from interface:LogReturns if theLog.INFOlog level is enabled.- Specified by:
isInfoEnabledin interfaceLog
-
isWarnEnabled
public boolean isWarnEnabled()Description copied from interface:LogReturns if theLog.WARNlog level is enabled.- Specified by:
isWarnEnabledin interfaceLog
-
isErrorEnabled
public boolean isErrorEnabled()Description copied from interface:LogReturns if theLog.ERRORlog level is enabled.- Specified by:
isErrorEnabledin interfaceLog
-
isFatalEnabled
public boolean isFatalEnabled()Description copied from interface:LogReturns if theLog.FATALlog level is enabled.- Specified by:
isFatalEnabledin interfaceLog
-
trace
Description copied from interface:LogWrite out a log message at theLog.TRACElevel with the stringification ofoas the body of the message. -
trace
Description copied from interface:LogWrite out a log message at theLog.TRACElevel with the stringification ofoas the body of the message, also outputtingtto the log. -
info
Description copied from interface:LogWrite out a log message at theLog.INFOlevel with the stringification ofoas the body of the message, also outputtingtto the log. -
info
Description copied from interface:LogWrite out a log message at theLog.INFOlevel with the stringification ofoas the body of the message, also outputtingtto the log. -
warn
Description copied from interface:LogWrite out a log message at theLog.WARNlevel with the stringification ofoas the body of the message, also outputtingtto the log. -
warn
Description copied from interface:LogWrite out a log message at theLog.WARNlevel with the stringification ofoas the body of the message, also outputtingtto the log. -
error
Description copied from interface:LogWrite out a log message at theLog.ERRORlevel with the stringification ofoas the body of the message, also outputtingtto the log. -
error
Description copied from interface:LogWrite out a log message at theLog.ERRORlevel with the stringification ofoas the body of the message, also outputtingtto the log. -
fatal
Description copied from interface:LogWrite out a log message at theLog.FATALlevel with the stringification ofoas the body of the message, also outputtingtto the log. -
fatal
Description copied from interface:LogWrite out a log message at theLog.FATALlevel with the stringification ofoas the body of the message, also outputtingtto the log. -
getStackTrace
Utility method to obtain a stack trace as a String.
-