|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Log
An interface to logging system implementations based on seevn logging levels:
| Field Summary | |
|---|---|
static int |
ACCESS
The access request level. |
static int |
DEBUG
The debug level. |
static int |
ERROR
The recoverable error level. |
static int |
FATAL
The fatal error level. |
static int |
INFO
The info level. |
static String |
INTERNAL_ERROR
An internal error message. |
static String[] |
LEVELS
The string levels. |
static int |
NONE
The none level. |
static int |
TRACE
The trace level. |
static int |
WARN
The warn level. |
static int |
WARNING
The warning level. |
| Method Summary | |
|---|---|
void |
access(long time,
String msg,
Object arg)
Logs an access message. |
void |
debug(Object msg)
Logs a debug message. |
void |
debug(String msg,
Object arg)
Logs a debug message with an argument. |
void |
error(Object msg)
Logs an error message. |
void |
error(String msg,
Object arg)
Logs an error message with an argument. |
void |
error(String msg,
Object arg,
Throwable cause)
Logs an error message with an argument and reason. |
void |
fatal(Object msg)
Logs a fatal message. |
void |
fatal(String msg,
Object arg)
Logs a fatal message with an argument. |
void |
fatal(String msg,
Object arg,
Throwable cause)
Logs a fatal message with an argument and reason. |
Object |
getContext()
Gets the context of this log. |
int |
getLevel()
Gets the log level. |
Object |
getLogger()
Gets the logger of this log. |
String |
getLoggerName()
Gets the logger name of this log. |
void |
info(Object msg)
Logs an info message. |
void |
info(String msg,
Object arg)
Logs an info message with an argument. |
boolean |
isAccess()
Checks whether access is enabled. |
boolean |
isActive()
Checks whether this log is activated. |
boolean |
isDebug()
Checks whether debug is enabled. |
boolean |
isError()
Checks whether error is enabled. |
boolean |
isFatal()
Checks whether fatal is enabled. |
boolean |
isInfo()
Checks whether info is enabled. |
boolean |
isLog(int level)
Checks whether the specified level is enabled. |
boolean |
isTrace()
Checks whether trace is enabled. |
boolean |
isWarn()
Checks whether warn is enabled. |
String |
localize(Localizer localizer,
Throwable target)
Localizes the specified exception applying the given localizer. |
String |
localize(Localizer localizer,
Throwable target,
Locale locale)
Localizes the specified exception for the given locale applying the given localizer. |
String |
localize(Localizer localizer,
Throwable target,
Object arg)
Localizes the specified exception with an argument applying the given localizer. |
String |
localize(Localizer localizer,
Throwable target,
Object arg,
Locale locale)
Localizes the specified exception with an argument for the given locale applying the given localizer. |
String |
localize(Throwable target)
Localizes the specified exception. |
String |
localize(Throwable target,
Locale locale)
Localizes the specified exception for the given locale. |
String |
localize(Throwable target,
Object arg)
Localizes the specified exception with an argument. |
String |
localize(Throwable target,
Object arg,
Locale locale)
Localizes the specified exception with an argument for the given locale. |
void |
log(int level,
long time,
String msg,
Object arg)
Logs a message with a specific level, date and argument. |
void |
log(int level,
long time,
String msg,
Object arg,
Throwable cause)
Logs a message with a specific level, date, argument and reason. |
void |
log(int level,
Object msg)
Logs a message with a specific level. |
void |
log(int level,
String msg,
Object arg)
Logs a message with a specific level and argument. |
void |
log(int level,
String msg,
Object arg,
Throwable cause)
Logs a message with a specific level, argument and reason. |
void |
trace(Object msg)
Logs a trace message. |
void |
trace(String msg,
Object arg)
Logs a trace message with an argument. |
void |
warn(Object msg)
Logs a warn message. |
void |
warn(String msg,
Object arg)
Logs a warn message with an argument. |
void |
warn(String msg,
Object arg,
Throwable cause)
Logs a warn message with an argument and reason. |
| Field Detail |
|---|
static final String INTERNAL_ERROR
static final int NONE
static final int DEBUG
static final int TRACE
static final int INFO
static final int WARN
static final int WARNING
static final int ERROR
static final int FATAL
static final int ACCESS
static final String[] LEVELS
| Method Detail |
|---|
boolean isDebug()
boolean isTrace()
boolean isInfo()
boolean isWarn()
boolean isError()
boolean isFatal()
boolean isAccess()
boolean isLog(int level)
level - the logging level.
int getLevel()
void debug(Object msg)
msg - the message to log.
void debug(String msg,
Object arg)
msg - the message to log.arg - the argument or cause.void trace(Object msg)
msg - the message to log.
void trace(String msg,
Object arg)
msg - the message to log.arg - the argument or cause.void info(Object msg)
msg - the message to log.
void info(String msg,
Object arg)
msg - the message to log.arg - the argument or cause.void warn(Object msg)
msg - the message to log.
void warn(String msg,
Object arg)
msg - the message to log.arg - the argument or cause.
void warn(String msg,
Object arg,
Throwable cause)
msg - the message to log.arg - the argument.cause - the cause.void error(Object msg)
msg - the message to log.
void error(String msg,
Object arg)
msg - the message to log.arg - the argument or cause.
void error(String msg,
Object arg,
Throwable cause)
msg - the message to log.arg - the argument.cause - the cause.void fatal(Object msg)
msg - the message to log.
void fatal(String msg,
Object arg)
msg - the message to log.arg - the argument or cause.
void fatal(String msg,
Object arg,
Throwable cause)
msg - the message to log.arg - the argument.cause - the cause.
void access(long time,
String msg,
Object arg)
time - the time of the event.msg - the message to log.arg - the argument.
void log(int level,
Object msg)
level - the level of the message.msg - the message to log.
void log(int level,
String msg,
Object arg)
level - the level of the message.msg - the message to log.arg - the argument or cause.
void log(int level,
String msg,
Object arg,
Throwable cause)
level - the level of the message.msg - the message to log.arg - the argument.cause - the cause.
void log(int level,
long time,
String msg,
Object arg)
level - the level of the message.time - the time of the event.msg - the message to log.arg - the argument or cause.
void log(int level,
long time,
String msg,
Object arg,
Throwable cause)
level - the level of the message.time - the time of the event.msg - the message to log.arg - the argument.cause - the cause.String localize(Throwable target)
target - the exception.
String localize(Throwable target,
Object arg)
target - the exception.arg - the argument.
String localize(Throwable target,
Locale locale)
target - the exception.locale - the locale.
String localize(Throwable target,
Object arg,
Locale locale)
target - the exception.arg - the argument.locale - the locale.
String localize(Localizer localizer,
Throwable target)
target - the exception.localizer - the localizer.
String localize(Localizer localizer,
Throwable target,
Object arg)
target - the exception.arg - the argument.localizer - the localizer.
String localize(Localizer localizer,
Throwable target,
Locale locale)
target - the exception.locale - the locale.localizer - the localizer.
String localize(Localizer localizer,
Throwable target,
Object arg,
Locale locale)
The message is constructed by using the exception type and non-localized message as a key for the localized message. If such a message can't be found, the plain exception type is used as the key. If such a message is found and it ends with a colon, the non-localized message is appended to it. If such a message is not found, the non-localized message is returned unmodified.
target - the exception.arg - the argument.locale - the locale.localizer - the localizer.
String getLoggerName()
Object getLogger()
Object getContext()
boolean isActive()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||