Class SimpleExoLog
- java.lang.Object
-
- org.exoplatform.services.log.impl.SimpleExoLog
-
- All Implemented Interfaces:
Log
public class SimpleExoLog extends Object implements Log
Based on apache commons loggingSimpleLogclass. It could be implemented later to use the system output directly in the future if the dependency over commons logging is removed.- Version:
- $Id: SimpleExoLog.java 34394 2009-07-23 09:23:31Z dkatayev $
- Author:
- Julien Viet
-
-
Constructor Summary
Constructors Constructor Description SimpleExoLog(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddebug(Object o)Log a message with debug log level.voiddebug(Object o, Throwable throwable)Log an error with debug log level.voiddebug(String format, Object... argsArray)Log an error with debug log level.voiderror(Object o)Log a message with error log level.voiderror(Object o, Throwable throwable)Log an error with error log level.voiderror(String format, Object... argsArray)Log a message with error log level.voidfatal(Object o)Log a message with fatal log level.voidfatal(Object o, Throwable throwable)Log an error with fatal log level.voidfatal(String format, Object... argsArray)Log a message with fatal log level.intgetLevel()voidinfo(Object o)Log a message with info log level.voidinfo(Object o, Throwable throwable)Log an error with info log level.voidinfo(String format, Object... argsArray)Log an error with info log level.booleanisDebugEnabled()Is debug logging currently enabled?booleanisErrorEnabled()Is error logging currently enabled?booleanisFatalEnabled()Is fatal logging currently enabled?booleanisInfoEnabled()Is info logging currently enabled?booleanisTraceEnabled()Is trace logging currently enabled?booleanisWarnEnabled()Is warn logging currently enabled?voidsetLevel(int i)voidtrace(Object o)Log a message with trace log level.voidtrace(Object o, Throwable throwable)Log an error with trace log level.voidtrace(String format, Object... argsArray)Log an error with trace log level.voidwarn(Object o)Log a message with warn log level.voidwarn(Object o, Throwable throwable)Log an error with warn log level.voidwarn(String format, Object... argsArray)Log a message with warn log level.
-
-
-
Constructor Detail
-
SimpleExoLog
public SimpleExoLog(String name)
-
-
Method Detail
-
setLevel
public void setLevel(int i)
-
getLevel
public int getLevel()
-
debug
public void debug(Object o)
Description copied from interface:LogLog a message with debug log level.
-
debug
public void debug(Object o, Throwable throwable)
Description copied from interface:LogLog an error with debug log level.
-
trace
public void trace(Object o)
Description copied from interface:LogLog a message with trace log level.
-
trace
public void trace(Object o, Throwable throwable)
Description copied from interface:LogLog an error with trace log level.
-
info
public void info(Object o)
Description copied from interface:LogLog a message with info log level.
-
info
public void info(Object o, Throwable throwable)
Description copied from interface:LogLog an error with info log level.
-
warn
public void warn(Object o)
Description copied from interface:LogLog a message with warn log level.
-
warn
public void warn(Object o, Throwable throwable)
Description copied from interface:LogLog an error with warn log level.
-
error
public void error(Object o)
Description copied from interface:LogLog a message with error log level.
-
error
public void error(Object o, Throwable throwable)
Description copied from interface:LogLog an error with error log level.
-
fatal
public void fatal(Object o)
Description copied from interface:LogLog a message with fatal log level.
-
fatal
public void fatal(Object o, Throwable throwable)
Description copied from interface:LogLog an error with fatal log level.
-
isDebugEnabled
public boolean isDebugEnabled()
Description copied from interface:LogIs debug logging currently enabled?
Call this method to prevent having to perform expensive operations (for example,
Stringconcatenation) when the log level is more than debug.- Specified by:
isDebugEnabledin interfaceLog- Returns:
- true if debug is enabled in the underlying logger.
-
isErrorEnabled
public boolean isErrorEnabled()
Description copied from interface:LogIs error logging currently enabled?
Call this method to prevent having to perform expensive operations (for example,
Stringconcatenation) when the log level is more than error.- Specified by:
isErrorEnabledin interfaceLog- Returns:
- true if error is enabled in the underlying logger.
-
isFatalEnabled
public boolean isFatalEnabled()
Description copied from interface:LogIs fatal logging currently enabled?
Call this method to prevent having to perform expensive operations (for example,
Stringconcatenation) when the log level is more than fatal.- Specified by:
isFatalEnabledin interfaceLog- Returns:
- true if fatal is enabled in the underlying logger.
-
isInfoEnabled
public boolean isInfoEnabled()
Description copied from interface:LogIs info logging currently enabled?
Call this method to prevent having to perform expensive operations (for example,
Stringconcatenation) when the log level is more than info.- Specified by:
isInfoEnabledin interfaceLog- Returns:
- true if info is enabled in the underlying logger.
-
isTraceEnabled
public boolean isTraceEnabled()
Description copied from interface:LogIs trace logging currently enabled?
Call this method to prevent having to perform expensive operations (for example,
Stringconcatenation) when the log level is more than trace.- Specified by:
isTraceEnabledin interfaceLog- Returns:
- true if trace is enabled in the underlying logger.
-
isWarnEnabled
public boolean isWarnEnabled()
Description copied from interface:LogIs warn logging currently enabled?
Call this method to prevent having to perform expensive operations (for example,
Stringconcatenation) when the log level is more than warn.- Specified by:
isWarnEnabledin interfaceLog- Returns:
- true if warn is enabled in the underlying logger.
-
trace
public void trace(String format, Object... argsArray)
Description copied from interface:LogLog an error with trace log level.
- Specified by:
tracein interfaceLog- Parameters:
format-
Stringformat to represent log message. Sequence of '{}' is used to represent an anchor which will be replaced by string representation of objects in argArrayargsArray-
array of arguments to add to log message includingThrowable,Stringor any otherObjectfor which string representation will be used
-
debug
public void debug(String format, Object... argsArray)
Description copied from interface:LogLog an error with debug log level.
- Specified by:
debugin interfaceLog- Parameters:
format-
Stringformat to represent log message. Sequence of '{}' is used to represent an anchor which will be replaced by string representation of objects in argArrayargsArray-
array of arguments to add to log message includingThrowable,Stringor any otherObjectfor which string representation will be used
-
info
public void info(String format, Object... argsArray)
Description copied from interface:LogLog an error with info log level.
- Specified by:
infoin interfaceLog- Parameters:
format-
Stringformat to represent log message. Sequence of '{}' is used to represent an anchor which will be replaced by string representation of objects in argArrayargsArray-
array of arguments to add to log message includingThrowable,Stringor any otherObjectfor which string representation will be used
-
warn
public void warn(String format, Object... argsArray)
Description copied from interface:LogLog a message with warn log level.
- Specified by:
warnin interfaceLog- Parameters:
format-
Stringformat to represent log message. Sequence of '{}' is used to represent an anchor which will be replaced by string representation of objects in argArrayargsArray-
array of arguments to add to log message includingThrowable,Stringor any otherObjectfor which string representation will be used
-
error
public void error(String format, Object... argsArray)
Description copied from interface:LogLog a message with error log level.
- Specified by:
errorin interfaceLog- Parameters:
format-
Stringformat to represent log message. Sequence of '{}' is used to represent an anchor which will be replaced by string representation of objects in argArrayargsArray-
array of arguments to add to log message includingThrowable,Stringor any otherObjectfor which string representation will be used
-
fatal
public void fatal(String format, Object... argsArray)
Description copied from interface:LogLog a message with fatal log level.
- Specified by:
fatalin interfaceLog- Parameters:
format-
Stringformat to represent log message. Sequence of '{}' is used to represent an anchor which will be replaced by string representation of objects in argArrayargsArray-
array of arguments to add to log message includingThrowable,Stringor any otherObjectfor which string representation will be used
-
-