|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jlog2.Logger
public class Logger
This class stores log channels appropriate for each Logger instance and provides the methods to log messages to those channels.
| Constructor Summary | |
|---|---|
Logger(java.lang.String thisLoggerID)
Create a new instance of Logger. |
|
Logger(java.lang.String thisLoggerID,
java.lang.String thisClassName)
Create a new instance of Logger. |
|
| Method Summary | |
|---|---|
void |
addDebugChannels(java.util.Vector theDebugChannels)
Add the channels to write the debug messages to. |
void |
addLogChannels(java.util.Vector theLogChannels)
Add the channels to write the log messages to. |
void |
debugError(java.lang.String level,
java.lang.Exception error)
Debug the error on the appropriate channels. |
void |
debugMessage(java.lang.String level,
java.lang.String methodName,
java.lang.String message)
Debug the message on the appropriate channels. |
boolean |
getDebug()
Get the value indicating if the debug channels are being used. |
java.lang.String |
getLoggerID()
Get the unique id that created this logger. |
void |
logError(java.lang.String level,
java.lang.Exception error)
Log the error on the appropriate channels. |
void |
logMessage(java.lang.String level,
java.lang.String methodName,
java.lang.String message)
Log the message on the appropriate channels. |
void |
setDebug(boolean thisDebug)
Set a value indicating if the debug channels should be used. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Logger(java.lang.String thisLoggerID)
thisLoggerID - the unique logger id.
public Logger(java.lang.String thisLoggerID,
java.lang.String thisClassName)
thisLoggerID - the unique logger id.thisClassName - the classname of the class that uses this logger if
different from the logger id.| Method Detail |
|---|
public void setDebug(boolean thisDebug)
thisDebug - true if log a debug trace, false otherwise.public boolean getDebug()
public java.lang.String getLoggerID()
public void addLogChannels(java.util.Vector theLogChannels)
theLogChannels - the channels to write the log messages to.public void addDebugChannels(java.util.Vector theDebugChannels)
theDebugChannels - the channels to write the debug messages to.
public void logMessage(java.lang.String level,
java.lang.String methodName,
java.lang.String message)
throws java.lang.Exception
level - the log level for the message, error, warning, etc.methodName - the name of the method in the class logging the message.message - the message to log.
java.lang.Exception - any error.
public void debugMessage(java.lang.String level,
java.lang.String methodName,
java.lang.String message)
throws java.lang.Exception
level - the log level for the message, error, warning, etc.methodName - the name of the method in the class logging the message.message - the message to log.
java.lang.Exception - any error.
public void logError(java.lang.String level,
java.lang.Exception error)
throws java.lang.Exception
level - the log level for the message, error, warning, etc.error - the error to log.
java.lang.Exception - any error.
public void debugError(java.lang.String level,
java.lang.Exception error)
throws java.lang.Exception
level - the log level for the message, error, warning, etc.error - the error to debug.
java.lang.Exception - any error.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||