|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.montsuqi.util.Logger
public abstract class Logger
An abstract logger class.
This class abstracts differences among various logging systems.
Actual class of loggers are determined by the system property "monsia.logger.factory".
| Field Summary | |
|---|---|
static int |
DEBUG
|
static int |
FATAL
|
static int |
INFO
|
protected int |
level
|
static int |
TRACE
|
static int |
WARNING
|
| Constructor Summary | |
|---|---|
protected |
Logger()
|
| Method Summary | |
|---|---|
abstract void |
debug(java.lang.String message)
Logs a message in debug level. |
void |
debug(java.lang.String format,
java.lang.Object arg)
Logs a formatted mesasge with given argument in debug level. |
void |
debug(java.lang.String format,
java.lang.Object[] args)
Logs a formatted mesasge with given arguments in debug level. |
void |
debug(java.lang.Throwable e)
Logs an exception in debug level. |
void |
enter()
Used to log on entering into a method with no argument. |
void |
enter(java.lang.Object arg1)
Used to log on entering into a method with one argument. |
void |
enter(java.lang.Object[] args)
Used to log on entering into a method with any number of arguments. |
void |
enter(java.lang.Object arg1,
java.lang.Object arg2)
Used to log on entering into a method with two arguments. |
void |
enter(java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3)
Used to log on entering into a method with three arguments. |
abstract void |
fatal(java.lang.String message)
Logs a message in fatal level. |
void |
fatal(java.lang.String format,
java.lang.Object arg)
Logs a formatted mesasge with given argument in fatal level. |
void |
fatal(java.lang.String format,
java.lang.Object[] args)
Logs a formatted mesasge with given arguments in fatal level. |
void |
fatal(java.lang.Throwable e)
Logs an exception in fatal level. |
protected java.lang.String |
formatMessage(java.lang.String format,
java.lang.Object arg)
|
protected java.lang.String |
formatMessage(java.lang.String format,
java.lang.Object[] args)
|
static Logger |
getLogger(java.lang.Class clazz)
Creates a logger for the name of given class. |
static Logger |
getLogger(java.lang.String name)
Creates a logger for the given name. |
abstract void |
info(java.lang.String message)
Logs a message in info level. |
void |
info(java.lang.String format,
java.lang.Object arg)
Logs a formatted mesasge with given argument in info level. |
void |
info(java.lang.String format,
java.lang.Object[] args)
Logs a formatted mesasge with given arguments in info level. |
void |
info(java.lang.Throwable e)
Logs an exception in info level. |
void |
leave()
Used to log on leaving a method. |
abstract void |
trace(java.lang.String message)
Logs a message in trace level. |
void |
trace(java.lang.String format,
java.lang.Object arg)
Logs a formatted mesasge with given argument in trace level. |
void |
trace(java.lang.String format,
java.lang.Object[] args)
Logs a formatted mesasge with given arguments in trace level. |
void |
trace(java.lang.Throwable e)
Logs an exception in trace level. |
abstract void |
warn(java.lang.String message)
Logs a message in warn level. |
void |
warn(java.lang.String format,
java.lang.Object arg)
Logs a formatted mesasge with given argument in warn level. |
void |
warn(java.lang.String format,
java.lang.Object[] args)
Logs a formatted mesasge with given arguments in warn level. |
void |
warn(java.lang.Throwable e)
Logs an exception in warn level. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int FATAL
public static final int WARNING
public static final int INFO
public static final int DEBUG
public static final int TRACE
protected int level
| Constructor Detail |
|---|
protected Logger()
| Method Detail |
|---|
public static Logger getLogger(java.lang.Class clazz)
Creates a logger for the name of given class.
clazz - public static Logger getLogger(java.lang.String name)
Creates a logger for the given name.
Actual class for the logger is determined by the system property "monsia.logger.factory". Possible values are:
If "monsia.logger.factory" is not set, org.montsuqi.util.StdErrLogger is used.
name - public void enter()
Used to log on entering into a method with no argument.
public void enter(java.lang.Object arg1)
Used to log on entering into a method with one argument.
arg1 - argument to the method in concern.
public void enter(java.lang.Object arg1,
java.lang.Object arg2)
Used to log on entering into a method with two arguments.
arg1 - first argument to the method in concern.arg2 - second argument to the method in concern.
public void enter(java.lang.Object arg1,
java.lang.Object arg2,
java.lang.Object arg3)
Used to log on entering into a method with three arguments.
arg1 - first argument to the method in concern.arg2 - second argument to the method in concern.arg3 - third argument to the method in concern.public void enter(java.lang.Object[] args)
Used to log on entering into a method with any number of arguments.
args - arguments to the method in concern.public void leave()
Used to log on leaving a method.
public abstract void trace(java.lang.String message)
Logs a message in trace level.
message - the message to log.public abstract void debug(java.lang.String message)
Logs a message in debug level.
message - the message to log.public abstract void info(java.lang.String message)
Logs a message in info level.
message - the message to log.public abstract void warn(java.lang.String message)
Logs a message in warn level.
message - the message to log.public abstract void fatal(java.lang.String message)
Logs a message in fatal level.
message - the message to log.
protected final java.lang.String formatMessage(java.lang.String format,
java.lang.Object[] args)
protected final java.lang.String formatMessage(java.lang.String format,
java.lang.Object arg)
public void trace(java.lang.String format,
java.lang.Object[] args)
Logs a formatted mesasge with given arguments in trace level.
format - the message format.args - the objects to format.
public void debug(java.lang.String format,
java.lang.Object[] args)
Logs a formatted mesasge with given arguments in debug level.
format - the message format.args - the objects to format.
public void info(java.lang.String format,
java.lang.Object[] args)
Logs a formatted mesasge with given arguments in info level.
format - the message format.args - the objects to format.
public void warn(java.lang.String format,
java.lang.Object[] args)
Logs a formatted mesasge with given arguments in warn level.
format - the message format.args - the objects to format.
public void fatal(java.lang.String format,
java.lang.Object[] args)
Logs a formatted mesasge with given arguments in fatal level.
format - the message format.args - the objects to format.
public void trace(java.lang.String format,
java.lang.Object arg)
Logs a formatted mesasge with given argument in trace level.
format - the message format.arg - the object to format.
public void debug(java.lang.String format,
java.lang.Object arg)
Logs a formatted mesasge with given argument in debug level.
format - the message format.arg - the object to format.
public void info(java.lang.String format,
java.lang.Object arg)
Logs a formatted mesasge with given argument in info level.
format - the message format.arg - the object to format.
public void warn(java.lang.String format,
java.lang.Object arg)
Logs a formatted mesasge with given argument in warn level.
format - the message format.arg - the object to format.
public void fatal(java.lang.String format,
java.lang.Object arg)
Logs a formatted mesasge with given argument in fatal level.
format - the message format.arg - the object to format.public void trace(java.lang.Throwable e)
Logs an exception in trace level.
e - the exception to log.public void debug(java.lang.Throwable e)
Logs an exception in debug level.
e - the exception to log.public void info(java.lang.Throwable e)
Logs an exception in info level.
e - the exception to log.public void warn(java.lang.Throwable e)
Logs an exception in warn level.
e - the exception to log.public void fatal(java.lang.Throwable e)
Logs an exception in fatal level.
e - theexception to log.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||