public interface Logger
echo(String)-style methods outputting both to console
and to jrebel.log and log(String)-style methods outputting only to log.
To use it acquire an instance from LoggerFactoryLoggerFactory,
Integration,
Configuration,
Reloader,
Plugin| Modifier and Type | Field and Description |
|---|---|
static String |
SYSPROP_LOG
Enables debug logging to the jrebel.log file.
|
static String |
SYSPROP_LOG_PERF
Enables additional logging of the performance statistics to the jrebel.log file.
|
| Modifier and Type | Method and Description |
|---|---|
StopWatch |
createStopWatch(String category)
Returns a StopWatch used to log time taken by something.
|
void |
debug(String message)
Writes message to jrebel.log if enabled.
|
void |
debug(String format,
Object... args)
Writes formatted message to jrebel.log if enabled.
|
void |
debug(String format,
Object arg)
Writes formatted message to jrebel.log if enabled.
|
void |
debug(String format,
Object arg1,
Object arg2)
Writes formatted message to jrebel.log if enabled.
|
void |
debug(String message,
Throwable e)
Dumps message and stacktrace to jrebel.log if enabled.
|
void |
echo()
Adds a newline to jrebel.log if enabled and prints it to console if console output is enabled.
|
void |
echo(String message)
Logs a message to jrebel.log if enabled and prints it to console if console output is enabled.
|
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.
|
void |
error(String message)
Writes message to jrebel.log if enabled.
|
void |
error(String format,
Object... args)
Writes formatted message to jrebel.log if enabled.
|
void |
error(String format,
Object arg)
Writes formatted message to jrebel.log if enabled.
|
void |
error(String format,
Object arg1,
Object arg2)
Writes formatted message to jrebel.log if enabled.
|
void |
error(String message,
Throwable e)
Dumps message and stacktrace to jrebel.log if enabled.
|
void |
error(Throwable e)
Dumps stacktrace to jrebel.log if enabled.
|
void |
errorEcho(String message)
Writes message to jrebel.log if enabled and prints it to console if console output is enabled.
|
void |
errorEcho(String message,
Object... args) |
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.
|
void |
errorEcho(Throwable e)
Dumps stacktrace to jrebel.log if enabled and prints it to console if console output is enabled.
|
void |
errorTrace(Throwable e)
Dumps stacktrace to jrebel.log if trace is enabled.
|
File |
getActiveLogFile()
Gets the file currently used for logging.
|
void |
info(String message)
Writes message to jrebel.log if enabled.
|
void |
info(String format,
Object... args)
Writes formatted message to jrebel.log if enabled.
|
void |
info(String format,
Object arg)
Writes formatted message to jrebel.log if enabled.
|
void |
info(String format,
Object arg1,
Object arg2)
Writes formatted message to jrebel.log if enabled.
|
void |
info(String message,
Throwable e)
Dumps message and stacktrace to jrebel.log if enabled.
|
void |
infoEcho(String message)
Writes message to jrebel.log if enabled and prints it to console if console output is enabled.
|
void |
infoEcho(String message,
Object... args) |
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.
|
boolean |
isDebugEnabled() |
boolean |
isEnabled()
Returns
true if logging to jrebel.log is enabled. |
boolean |
isErrorEnabled() |
boolean |
isInfoEnabled() |
boolean |
isTraceEnabled() |
boolean |
isWarnEnabled() |
void |
log(String message)
Logs a message to jrebel.log if enabled.
|
Logger |
prefix(String prefix)
Returns a Logger instance including the given prefix in each message.
|
Logger |
productPrefix(String prefix)
Returns a Logger instance including the product name plus the given prefix
in each message.
|
void |
trace(String message)
Logs a message to jrebel.log if trace is enabled.
|
void |
trace(String format,
Object... args)
Writes formatted message to jrebel.log if enabled.
|
void |
trace(String format,
Object arg)
Writes formatted message to jrebel.log if enabled.
|
void |
trace(String format,
Object arg1,
Object arg2)
Writes formatted message to jrebel.log if enabled.
|
void |
trace(String message,
Throwable e)
Dumps message and stacktrace to jrebel.log if enabled.
|
void |
warn(String message)
Writes message to jrebel.log if enabled.
|
void |
warn(String format,
Object... args)
Writes formatted message to jrebel.log if enabled.
|
void |
warn(String format,
Object arg)
Writes formatted message to jrebel.log if enabled.
|
void |
warn(String format,
Object arg1,
Object arg2)
Writes formatted message to jrebel.log if enabled.
|
void |
warn(String message,
Throwable e)
Dumps message and stacktrace to jrebel.log if enabled.
|
void |
warnEcho(String message)
Writes message to jrebel.log if enabled and prints it to console if console output is enabled.
|
void |
warnEcho(String message,
Object... args) |
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.
|
static final String SYSPROP_LOG
static final String SYSPROP_LOG_PERF
File getActiveLogFile()
void error(String message)
void error(String format, Object arg)
void error(String format, Object arg1, Object arg2)
void error(String format, Object... args)
void error(String message, Throwable e)
void warn(String message)
void warn(String format, Object arg)
void warn(String format, Object arg1, Object arg2)
void warn(String format, Object... args)
void info(String message)
void info(String format, Object arg)
void info(String format, Object arg1, Object arg2)
void info(String format, Object... args)
void debug(String message)
void debug(String format, Object arg)
void debug(String format, Object arg1, Object arg2)
void debug(String format, Object... args)
void debug(String message, Throwable e)
void trace(String message)
void trace(String format, Object arg)
void trace(String format, Object arg1, Object arg2)
void trace(String format, Object... args)
void trace(String message, Throwable e)
boolean isErrorEnabled()
true if error logging to jrebel.log is enabled.boolean isWarnEnabled()
true if warn logging to jrebel.log is enabled.boolean isInfoEnabled()
true if info logging to jrebel.log is enabled.boolean isDebugEnabled()
true if debug logging to jrebel.log is enabled.boolean isTraceEnabled()
true if trace logging to jrebel.log is enabled.void errorEcho(String message)
void errorEcho(String message, Throwable e)
void warnEcho(String message)
void warnEcho(String message, Throwable e)
void infoEcho(String message)
void infoEcho(String message, Throwable e)
StopWatch createStopWatch(String category)
Logger prefix(String prefix)
E.g. logger.prefix("Prefix: ").log("Message") produces
Prefix: Message.
Logger productPrefix(String prefix)
E.g. logger.productPrefix("Prefix").log("Message") produces
JRebel-Prefix: Message.
void echo()
void echo(String message)
void echoPrefix(String message)
void errorEcho(Throwable e)
void error(Throwable e)
void log(String message)
void errorTrace(Throwable e)
boolean isEnabled()
true if logging to jrebel.log is enabled.true if logging to jrebel.log is enabled.Copyright © 2016. All rights reserved.