Package org.zeroturnaround.javarebel
Interface Logger
-
public interface LoggerProvides simple logging withecho(String)-style methods outputting both to console and to jrebel.log andlog(String)-style methods outputting only to log. To use it acquire an instance fromLoggerFactory- Since:
- 1.2
- Author:
- Jevgeni Kabanov (ekabanov@zeroturnaround.com), Aleksei Sosnovski
- See Also:
LoggerFactory,Integration,Configuration,Reloader,Plugin
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StopWatchcreateStopWatch(String category)Returns a StopWatch used to log time taken by something.voiddebug(String message)Writes message to jrebel.log if enabled.voiddebug(String format, Object arg)Writes formatted message to jrebel.log if enabled.voiddebug(String format, Object... args)Writes formatted message to jrebel.log if enabled.voiddebug(String format, Object arg1, Object arg2)Writes formatted message to jrebel.log if enabled.voiddebug(String message, Throwable e)Dumps message and stacktrace to jrebel.log if enabled.voidecho()Adds a newline to jrebel.log if enabled and prints it to console if console output is enabled.voidecho(String message)Logs a message to jrebel.log if enabled and prints it to console if console output is enabled.voidechoPrefix(String message)Logs a message to jrebel.log if enabled and prints it to console if console output is enabled including the product name (JRebel) as prefix.voiderror(String message)Writes message to jrebel.log if enabled.voiderror(String format, Object arg)Writes formatted message to jrebel.log if enabled.voiderror(String format, Object... args)Writes formatted message to jrebel.log if enabled.voiderror(String format, Object arg1, Object arg2)Writes formatted message to jrebel.log if enabled.voiderror(String message, Throwable e)Dumps message and stacktrace to jrebel.log if enabled.voiderror(Throwable e)Dumps stacktrace to jrebel.log if enabled.voiderrorEcho(String message)Writes message to jrebel.log if enabled and prints it to console if console output is enabled.voiderrorEcho(String message, Object... args)voiderrorEcho(String message, Throwable e)Dumps message and stacktrace to jrebel.log if enabled and prints it to console if console output is enabled.voiderrorEcho(Throwable e)Dumps stacktrace to jrebel.log if enabled and prints it to console if console output is enabled.voiderrorTrace(Throwable e)Dumps stacktrace to jrebel.log if trace is enabled.voidinfo(String message)Writes message to jrebel.log if enabled.voidinfo(String format, Object arg)Writes formatted message to jrebel.log if enabled.voidinfo(String format, Object... args)Writes formatted message to jrebel.log if enabled.voidinfo(String format, Object arg1, Object arg2)Writes formatted message to jrebel.log if enabled.voidinfo(String message, Throwable e)Dumps message and stacktrace to jrebel.log if enabled.voidinfoEcho(String message)Writes message to jrebel.log if enabled and prints it to console if console output is enabled.voidinfoEcho(String message, Object... args)voidinfoEcho(String message, Throwable e)Dumps message and stacktrace to jrebel.log if enabled and prints it to console if console output is enabled.booleanisDebugEnabled()booleanisEnabled()Returnstrueif logging to jrebel.log is enabled.booleanisErrorEnabled()booleanisInfoEnabled()booleanisTraceEnabled()booleanisWarnEnabled()voidlog(String message)Logs a message to jrebel.log if enabled.Loggerprefix(String prefix)Returns a Logger instance including the given prefix in each message.LoggerproductPrefix(String prefix)Returns a Logger instance including the product name plus the given prefix in each message.voidtrace(String message)Logs a message to jrebel.log if trace is enabled.voidtrace(String format, Object arg)Writes formatted message to jrebel.log if enabled.voidtrace(String format, Object... args)Writes formatted message to jrebel.log if enabled.voidtrace(String format, Object arg1, Object arg2)Writes formatted message to jrebel.log if enabled.voidtrace(String message, Throwable e)Dumps message and stacktrace to jrebel.log if enabled.voidwarn(String message)Writes message to jrebel.log if enabled.voidwarn(String format, Object arg)Writes formatted message to jrebel.log if enabled.voidwarn(String format, Object... args)Writes formatted message to jrebel.log if enabled.voidwarn(String format, Object arg1, Object arg2)Writes formatted message to jrebel.log if enabled.voidwarn(String message, Throwable e)Dumps message and stacktrace to jrebel.log if enabled.voidwarnEcho(String message)Writes message to jrebel.log if enabled and prints it to console if console output is enabled.voidwarnEcho(String message, Object... args)voidwarnEcho(String message, Throwable e)Dumps message and stacktrace to jrebel.log if enabled and prints it to console if console output is enabled.
-
-
-
Method Detail
-
error
void error(String message)
Writes message to jrebel.log if enabled.
-
error
void error(String format, Object arg)
Writes formatted message to jrebel.log if enabled. Uses same format as slf4j.
-
error
void error(String format, Object arg1, Object arg2)
Writes formatted message to jrebel.log if enabled. Uses same format as slf4j.
-
error
void error(String format, Object... args)
Writes formatted message to jrebel.log if enabled. Uses same format as slf4j.
-
error
void error(String message, Throwable e)
Dumps message and stacktrace to jrebel.log if enabled.
-
warn
void warn(String message)
Writes message to jrebel.log if enabled.
-
warn
void warn(String format, Object arg)
Writes formatted message to jrebel.log if enabled. Uses same format as slf4j.
-
warn
void warn(String format, Object arg1, Object arg2)
Writes formatted message to jrebel.log if enabled. Uses same format as slf4j.
-
warn
void warn(String format, Object... args)
Writes formatted message to jrebel.log if enabled. Uses same format as slf4j.
-
info
void info(String message)
Writes message to jrebel.log if enabled.
-
info
void info(String format, Object arg)
Writes formatted message to jrebel.log if enabled. Uses same format as slf4j.
-
info
void info(String format, Object arg1, Object arg2)
Writes formatted message to jrebel.log if enabled. Uses same format as slf4j.
-
info
void info(String format, Object... args)
Writes formatted message to jrebel.log if enabled. Uses same format as slf4j.
-
debug
void debug(String message)
Writes message to jrebel.log if enabled.
-
debug
void debug(String format, Object arg)
Writes formatted message to jrebel.log if enabled. Uses same format as slf4j.
-
debug
void debug(String format, Object arg1, Object arg2)
Writes formatted message to jrebel.log if enabled. Uses same format as slf4j.
-
debug
void debug(String format, Object... args)
Writes formatted message to jrebel.log if enabled. Uses same format as slf4j.
-
debug
void debug(String message, Throwable e)
Dumps message and stacktrace to jrebel.log if enabled.
-
trace
void trace(String message)
Logs a message to jrebel.log if trace is enabled.
-
trace
void trace(String format, Object arg)
Writes formatted message to jrebel.log if enabled. Uses same format as slf4j.
-
trace
void trace(String format, Object arg1, Object arg2)
Writes formatted message to jrebel.log if enabled. Uses same format as slf4j.
-
trace
void trace(String format, Object... args)
Writes formatted message to jrebel.log if enabled. Uses same format as slf4j.
-
trace
void trace(String message, Throwable e)
Dumps message and stacktrace to jrebel.log if enabled.
-
isErrorEnabled
boolean isErrorEnabled()
- Returns:
trueif error logging to jrebel.log is enabled.
-
isWarnEnabled
boolean isWarnEnabled()
- Returns:
trueif warn logging to jrebel.log is enabled.
-
isInfoEnabled
boolean isInfoEnabled()
- Returns:
trueif info logging to jrebel.log is enabled.
-
isDebugEnabled
boolean isDebugEnabled()
- Returns:
trueif debug logging to jrebel.log is enabled.
-
isTraceEnabled
boolean isTraceEnabled()
- Returns:
trueif trace logging to jrebel.log is enabled.
-
errorEcho
void errorEcho(String message)
Writes message to jrebel.log if enabled and prints it to console if console output is enabled.
-
errorEcho
void errorEcho(String message, Throwable e)
Dumps message and stacktrace to jrebel.log if enabled and prints it to console if console output is enabled.
-
warnEcho
void warnEcho(String message)
Writes message to jrebel.log if enabled and prints it to console if console output is enabled.
-
warnEcho
void warnEcho(String message, Throwable e)
Dumps message and stacktrace to jrebel.log if enabled and prints it to console if console output is enabled.
-
infoEcho
void infoEcho(String message)
Writes message to jrebel.log if enabled and prints it to console if console output is enabled.
-
infoEcho
void infoEcho(String message, Throwable e)
Dumps message and stacktrace to jrebel.log if enabled and prints it to console if console output is enabled.
-
createStopWatch
StopWatch createStopWatch(String category)
Returns a StopWatch used to log time taken by something.
-
prefix
Logger prefix(String prefix)
Returns a Logger instance including the given prefix in each message.E.g.
logger.prefix("Prefix: ").log("Message")producesPrefix: Message.
-
productPrefix
Logger productPrefix(String prefix)
Returns a Logger instance including the product name plus the given prefix in each message.E.g.
logger.productPrefix("Prefix").log("Message")producesJRebel-Prefix: Message.
-
echo
void echo()
Adds a newline to jrebel.log if enabled and prints it to console if console output is enabled.
-
echo
void echo(String message)
Logs a message to jrebel.log if enabled and prints it to console if console output is enabled.
-
echoPrefix
void echoPrefix(String message)
Logs a message to jrebel.log if enabled and prints it to console if console output is enabled including the product name (JRebel) as prefix.
-
errorEcho
void errorEcho(Throwable e)
Dumps stacktrace to jrebel.log if enabled and prints it to console if console output is enabled.
-
error
void error(Throwable e)
Dumps stacktrace to jrebel.log if enabled.
-
log
void log(String message)
Logs a message to jrebel.log if enabled.
-
errorTrace
void errorTrace(Throwable e)
Dumps stacktrace to jrebel.log if trace is enabled.
-
isEnabled
boolean isEnabled()
Returnstrueif logging to jrebel.log is enabled.- Returns:
trueif logging to jrebel.log is enabled.
-
-