public class LogReport extends Object
LogCatcher
Constructor and Description |
---|
LogReport() |
Modifier and Type | Method and Description |
---|---|
static void |
debug(String message)
Publish a debug log
|
static void |
error(String message)
Publish a error log
|
static void |
fatal(String message)
Publish a fatal log
|
static void |
information(String message)
Publish a information log
|
static void |
log(LogLevel logLevel,
String message)
Publish a log
|
static void |
register(LogCatcher logCatcher,
LogLevel... logLevels)
Register a
LogCatcher for specified log levels.
For LogLevel.SILENT nothing is register, since its means no log
report. |
static void |
registerAtLeast(LogCatcher logCatcher,
LogLevel logLevel)
Register
LogCatcher for given logLevel and all more important
that given one.
Importance log level from more important to less is:
LogLevel.FATAL
LogLevel.ERROR
LogLevel.WARNING
LogLevel.INFORMATION
LogLevel.VERBOSE
LogLevel.DEBUG
Note that LogLevel.SILENT is a special level for no log at all |
static void |
unregister(LogCatcher logCatcher,
LogLevel... logLevels)
Unregister a
LogCatcher for specified log levels. |
static void |
unregisterAll(LogCatcher logCatcher)
Unregister all log level that a given
LogCatcher is registered
for |
static void |
unregisterAtMost(LogCatcher logCatcher,
LogLevel logLevel)
Register
LogCatcher for given logLevel and all less important
that given one.
Importance log level from more important to less is:
LogLevel.FATAL
LogLevel.ERROR
LogLevel.WARNING
LogLevel.INFORMATION
LogLevel.VERBOSE
LogLevel.DEBUG
Note that LogLevel.SILENT is a special level for no log at all |
static void |
verbose(String message)
Publish a verbose log
|
static void |
warning(String message)
Publish a warning log
|
public static void register(LogCatcher logCatcher, LogLevel... logLevels)
LogCatcher
for specified log levels.
For LogLevel.SILENT
nothing is register, since its means no log
report.logCatcher
- LogCatcher
to register, must not be null
logLevels
- Log levels to be alert. LogLevel.SILENT
or
null
does nothingNullPointerException
- If given logCatcher is null
public static void registerAtLeast(LogCatcher logCatcher, LogLevel logLevel)
LogCatcher
for given logLevel and all more important
that given one.
Importance log level from more important to less is:
Note that LogLevel.SILENT
is a special level for no log at alllogCatcher
- LogCatcher
to registerlogLevel
- Minimum level to captureNullPointerException
- If logCatcher or logLevel is null
public static void unregister(LogCatcher logCatcher, LogLevel... logLevels)
LogCatcher
for specified log levels.logCatcher
- LogCatcher
to unregister, must not be null
logLevels
- Log levels to stop be alert.NullPointerException
- If given logCatcher is null
public static void unregisterAtMost(LogCatcher logCatcher, LogLevel logLevel)
LogCatcher
for given logLevel and all less important
that given one.
Importance log level from more important to less is:
Note that LogLevel.SILENT
is a special level for no log at alllogCatcher
- LogCatcher
to registerlogLevel
- Maximum level to stop to captureNullPointerException
- If logCatcher or logLevel is null
public static void unregisterAll(LogCatcher logCatcher)
LogCatcher
is registered
forlogCatcher
- LogCatcher
to unregister forNullPointerException
- If given logCatcher is null
public static void log(LogLevel logLevel, String message)
logLevel
- Log levelmessage
- Message to publishNullPointerException
- If logLevel or message is null
public static void fatal(String message)
message
- Fatal messageNullPointerException
- If message is null
public static void error(String message)
message
- Error messageNullPointerException
- If message is null
public static void warning(String message)
message
- Warning messageNullPointerException
- If message is null
public static void information(String message)
message
- Information messageNullPointerException
- If message is null
public static void verbose(String message)
message
- Verbose messageNullPointerException
- If message is null
public static void debug(String message)
message
- Debug messageNullPointerException
- If message is null
Copyright © 2020. All rights reserved.