|
|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.protomatter.syslog.Syslog
This class implements a system-wide logging utility. Please read the Syslog Whitepaper for more information. It allows a program to log messages and objects at different severity levels in a standardized way. The implementation of the log is specified by an object which implements the Syslogger interface. You can have multiple log implementations, and each can have it's own log mask or can inherit it's log mask from Syslog (this is the default behavior).
There are 5 severity levels: DEBUG, INFO, WARNING, ERROR, FATAL. They correspond to the numbers 0, 4, 8, 12, and 16, respectively. You can enable logging for any combination of these levels. The default setting logs only WARNING and above.
Anywhere you're doing this:
System.out.println("Some message"); Do this instead: Syslog.debug(this, "Some message"); If you're in a static method, do this: Syslog.debug(MyClass.class, "Some message"); If you like what this gets you, start playing around with different log levels (call "Syslog.info(...)" and others). If you like that, start playing around with channels and configuring the loggers and other things. Syslog has a very robust API and can be bent around to do all sorts of things, but it does not have to be complicated to use even though it can be configured in all sorts of complicated ways. |
// log simple message at DEBUG level // pass 'this' as the object performing the logging Syslog.log(this, "simple message", null, Syslog.DEBUG); |
There are basically three types of methods on this class for issuing log messages. Whenever a channel name is not specified, the channel DEFAULT_CHANNEL is used.
Whenever a channel is specified, it is an Object. This argument can either be a String or an array of String (in which case, the message will be sent out to multiple channels).
If you want to change these defaults, you can use the getLoggers(), addLogger(...), removeLogger(...) and removeAllLoggers() methods to change what loggers are registered with Syslog.
Syslog provides background work queues for loggers that need to perform their operations asynchronously. For instance, the MailLog performs its policy check synchronously and then if it decides that a message will actually need to be sent, it asks syslog to perform the operation asynchronously. This is far more efficient than doing everything in the background because the amount of synchronization necessary to add work to a queue is usually larger than a policy check.
Please read the Syslog Whitepaper for more information on Syslog.
Syslogger
,
SyslogChannelAware
Field Summary | |
static java.lang.String |
ALL_CHANNEL
The symbolic name for all channels. |
static Channel |
channel
A log channel for syslog configuration and system related messages. |
static int |
currentLogMask
The current system-wide log mask. |
static int |
DEBUG
A log generated during debugging of the software. |
static java.lang.String |
DEFAULT_CHANNEL
The name of the default log channel. |
static int |
ERROR
One of the software components caused an error or exception. |
static int |
FATAL
One of the software components is no longer functional. |
static int |
INFO
An informational message that might come in handy later. |
static int |
INHERIT_MASK
Loggers can inherit Syslog's log mask by setting their log mask to this value. |
static java.lang.String |
SYSLOG_CHANNEL_NAME
The name of a log channel for syslog configuration and system related messages. |
static int |
WARNING
A warning message that the system administrator might want to know about. |
static java.lang.String |
WARNING_PROPERTY
Syslog classloader warning system property name. |
Constructor Summary | |
protected |
Syslog()
Protected constructor. |
Method Summary | |
static void |
addLogger(Syslogger log)
Registers a new Syslogger object with Syslog. |
static void |
addWork(java.lang.String queueName,
java.lang.Runnable r)
Add work to the given background queue. |
static int |
atOrAbove(int level)
|
static boolean |
canDebug()
Determine if the current syslog mask would allow a message at the DEBUG level to be logged. |
static boolean |
canDebug(java.lang.Object logger)
Deprecated. |
static boolean |
canError()
Determine if the current syslog mask would allow a message at the ERROR level to be logged. |
static boolean |
canError(java.lang.Object logger)
Deprecated. |
static boolean |
canFatal()
Determine if the current syslog mask would allow a message at the FATAL level to be logged. |
static boolean |
canFatal(java.lang.Object logger)
Deprecated. |
static boolean |
canInfo()
Determine if the current syslog mask would allow a message at the INFO level to be logged. |
static boolean |
canInfo(java.lang.Object logger)
Deprecated. |
static boolean |
canLog(int level)
Determine if the current default syslog mask would allow the given level of message to be logged. |
static boolean |
canLog(java.lang.Object logger,
int level)
Deprecated. |
static boolean |
canWarning()
Determine if the current syslog mask would allow a message at the WARNING level to be logged. |
static boolean |
canWarning(java.lang.Object logger)
Deprecated. |
static void |
debug(java.net.InetAddress host,
java.lang.Object logger,
java.lang.Object message)
Logs a debug message, which will be converted through toString(). |
static void |
debug(java.net.InetAddress host,
java.lang.Object logger,
java.lang.Object message,
java.lang.Object detail)
Logs a debug message with a detail object, both of which will be converted through toString(). |
static void |
debug(java.lang.Object logger,
java.lang.Object message)
Logs a debug message, which will be converted through toString(). |
static void |
debug(java.lang.Object logger,
java.lang.Object message,
java.lang.Object detail)
Logs a debug message with a detail object, both of which will be converted through toString(). |
static void |
debugToChannel(java.net.InetAddress host,
java.lang.Object logger,
java.lang.Object channel,
java.lang.Object message)
Logs a debug message to the given channel. |
static void |
debugToChannel(java.net.InetAddress host,
java.lang.Object logger,
java.lang.Object channel,
java.lang.Object message,
java.lang.Object detail)
Logs a debug message with a detail object to the given channel. |
static void |
debugToChannel(java.lang.Object logger,
java.lang.Object channel,
java.lang.Object message)
Logs a debug message to the given channel. |
static void |
debugToChannel(java.lang.Object logger,
java.lang.Object channel,
java.lang.Object message,
java.lang.Object detail)
Logs a debug message with a detail object to the given channel. |
static void |
error(java.net.InetAddress host,
java.lang.Object logger,
java.lang.Object message)
Logs a error message, which will be converted through toString(). |
static void |
error(java.net.InetAddress host,
java.lang.Object logger,
java.lang.Object message,
java.lang.Object detail)
Logs a error message with a detail object, both of which will be converted through toString(). |
static void |
error(java.lang.Object logger,
java.lang.Object message)
Logs a error message, which will be converted through toString(). |
static void |
error(java.lang.Object logger,
java.lang.Object message,
java.lang.Object detail)
Logs a error message with a detail object, both of which will be converted through toString(). |
static void |
errorToChannel(java.net.InetAddress host,
java.lang.Object logger,
java.lang.Object channel,
java.lang.Object message)
Logs an error message to the given channel. |
static void |
errorToChannel(java.net.InetAddress host,
java.lang.Object logger,
java.lang.Object channel,
java.lang.Object message,
java.lang.Object detail)
Logs an error message with a detail object to the given channel. |
static void |
errorToChannel(java.lang.Object logger,
java.lang.Object channel,
java.lang.Object message)
Logs an error message to the given channel. |
static void |
errorToChannel(java.lang.Object logger,
java.lang.Object channel,
java.lang.Object message,
java.lang.Object detail)
Logs an error message with a detail object to the given channel. |
static void |
fatal(java.net.InetAddress host,
java.lang.Object logger,
java.lang.Object message)
Logs a fatal message, which will be converted through toString(). |
static void |
fatal(java.net.InetAddress host,
java.lang.Object logger,
java.lang.Object message,
java.lang.Object detail)
Logs a fatal message with a detail object, both of which will be converted through toString(). |
static void |
fatal(java.lang.Object logger,
java.lang.Object message)
Logs a fatal message, which will be converted through toString(). |
static void |
fatal(java.lang.Object logger,
java.lang.Object message,
java.lang.Object detail)
Logs a fatal message with a detail object, both of which will be converted through toString(). |
static void |
fatalToChannel(java.net.InetAddress host,
java.lang.Object logger,
java.lang.Object channel,
java.lang.Object message)
Logs a fatal message to the given channel. |
static void |
fatalToChannel(java.net.InetAddress host,
java.lang.Object logger,
java.lang.Object channel,
java.lang.Object message,
java.lang.Object detail)
Logs a fatal message with a detail object to the given channel. |
static void |
fatalToChannel(java.lang.Object logger,
java.lang.Object channel,
java.lang.Object message)
Logs a fatal message to the given channel. |
static void |
fatalToChannel(java.lang.Object logger,
java.lang.Object channel,
java.lang.Object message,
java.lang.Object detail)
Logs a fatal message with a detail object to the given channel. |
static void |
flush()
Flush output to all loggers. |
static long |
getFlushThreadInterval()
Get the sleep interval of the logger flush thread. |
static Syslog |
getInstance()
Returns the global Syslog instance. |
static java.net.InetAddress |
getLocalHostName()
Get the local hostname. |
static Syslogger |
getLogger(java.lang.String name)
Get a logger by name. |
static java.util.Iterator |
getLoggers()
Returns an Enumeration of all Syslogger objects registered with Syslog. |
static int |
getLogMask()
Get the default mask for logging of messages. |
static java.lang.String |
getLogMaskAsString()
Get a string representation of the current master log mask. |
static java.lang.String |
getLogMaskAsString(int logMask)
Get a string representation of the given log mask. |
static java.util.ResourceBundle |
getResources()
Get the resource bundle associated with Syslog. |
static java.lang.String |
getResourceString(java.lang.String name)
Get the value of the given resource name associated with Syslog. |
static java.util.Map |
getWorkQueueMap()
Get a map of the background work queues. |
static void |
info(java.net.InetAddress host,
java.lang.Object logger,
java.lang.Object message)
Logs a info message, which will be converted through toString(). |
static void |
info(java.net.InetAddress host,
java.lang.Object logger,
java.lang.Object message,
java.lang.Object detail)
Logs a info message with a detail object, both of which will be converted through toString(). |
static void |
info(java.lang.Object logger,
java.lang.Object message)
Logs a info message, which will be converted through toString(). |
static void |
info(java.lang.Object logger,
java.lang.Object message,
java.lang.Object detail)
Logs a info message with a detail object, both of which will be converted through toString(). |
static void |
infoToChannel(java.net.InetAddress host,
java.lang.Object logger,
java.lang.Object channel,
java.lang.Object message)
Logs an info message to the given channel. |
static void |
infoToChannel(java.net.InetAddress host,
java.lang.Object logger,
java.lang.Object channel,
java.lang.Object message,
java.lang.Object detail)
Logs an info message with a detail object to the given channel. |
static void |
infoToChannel(java.lang.Object logger,
java.lang.Object channel,
java.lang.Object message)
Logs an info message to the given channel. |
static void |
infoToChannel(java.lang.Object logger,
java.lang.Object channel,
java.lang.Object message,
java.lang.Object detail)
Logs an info message with a detail object to the given channel. |
static void |
log(java.net.InetAddress host,
java.lang.Object logger,
java.lang.Object msg,
java.lang.Object detail,
int level)
Log a message. |
static void |
log(java.net.InetAddress host,
java.lang.Object logger,
java.lang.Object channel,
java.lang.Object msg,
java.lang.Object detail,
int level)
Log a message. |
static void |
log(java.net.InetAddress host,
java.lang.Object logger,
java.lang.Object channel,
java.lang.Object msg,
java.lang.Object detail,
int level,
java.lang.Thread thread,
java.lang.String threadName,
long messageSendTime)
Log a message. |
static void |
log(java.net.InetAddress host,
java.lang.Object logger,
java.lang.Throwable e)
Logs an exception for the given object. |
static void |
log(java.net.InetAddress host,
java.lang.Object logger,
java.lang.Throwable e,
int level)
Logs an exception for the given object at a given level. |
static void |
log(java.lang.Object logger,
java.lang.Object msg,
java.lang.Object detail,
int level)
Log a message. |
static void |
log(java.lang.Object logger,
java.lang.Object channel,
java.lang.Object msg,
java.lang.Object detail,
int level)
Log a message. |
static void |
log(java.lang.Object logger,
java.lang.Throwable e)
Logs an exception for the given object. |
static void |
log(java.lang.Object logger,
java.lang.Throwable e,
int level)
Logs an exception for the given object at a given level. |
static boolean |
mightDebug(java.lang.Object logger)
Determine if it's likely that someone will listen to a debug message from the given logger. |
static boolean |
mightDebug(java.lang.Object logger,
java.lang.Object channel)
Determine if it's likely that someone will listen to a debug message from the given logger on the given channel(s). |
static boolean |
mightError(java.lang.Object logger)
Determine if it's likely that someone will listen to an error message from the given logger. |
static boolean |
mightError(java.lang.Object logger,
java.lang.Object channel)
Determine if it's likely that someone will listen to an error message from the given logger on the given channel(s). |
static boolean |
mightFatal(java.lang.Object logger)
Determine if it's likely that someone will listen to a fatal message from the given logger. |
static boolean |
mightFatal(java.lang.Object logger,
java.lang.Object channel)
Determine if it's likely that someone will listen to a fatal message from the given logger on the given channel(s). |
static boolean |
mightInfo(java.lang.Object logger)
Determine if it's likely that someone will listen to an info message from the given logger. |
static boolean |
mightInfo(java.lang.Object logger,
java.lang.Object channel)
Determine if it's likely that someone will listen to an info message from the given logger on the given channel(s). |
static boolean |
mightLog(java.lang.Object logger,
int level)
Determine if it's likely that someone will listen to a message from the given logger at the given level. |
static boolean |
mightLog(java.lang.Object logger,
int level,
java.lang.Object channel)
Determine if it's likely that someone will listen to a message from the given logger at the given level on the given channel(s). |
static boolean |
mightWarning(java.lang.Object logger)
Determine if it's likely that someone will listen to a warning message from the given logger. |
static boolean |
mightWarning(java.lang.Object logger,
java.lang.Object channel)
Determine if it's likely that someone will listen to a warning message from the given logger on the given channel(s). |
static int |
parseLogMask(java.lang.String mask)
Parse the mask. |
static void |
removeAllLoggers()
Deregisters all Syslogger objects. |
static boolean |
removeLogger(Syslogger log)
Deregisters a Syslogger object from Syslog. |
static void |
setFlushThreadInterval(long interval)
Set the number of milliseconds a flush thread should wait before flushing output on each logger. |
static void |
setLocalHostName()
Set the local hostname automatically. |
static void |
setLocalHostName(java.net.InetAddress host)
Set the local hostname. |
static void |
setLogMask(int mask)
Set the default mask for logging of messages. |
static void |
setLogMask(java.lang.String mask)
Set the mask. |
static void |
setMasterSwitch(boolean value)
Set the value of the master switch. |
static void |
shutdown()
Remove all the loggers and shut them down. |
static void |
warning(java.net.InetAddress host,
java.lang.Object logger,
java.lang.Object message)
Logs a warning message, which will be converted through toString(). |
static void |
warning(java.net.InetAddress host,
java.lang.Object logger,
java.lang.Object message,
java.lang.Object detail)
Logs a warning message with a detail object, both of which will be converted through toString(). |
static void |
warning(java.lang.Object logger,
java.lang.Object message)
Logs a warning message, which will be converted through toString(). |
static void |
warning(java.lang.Object logger,
java.lang.Object message,
java.lang.Object detail)
Logs a warning message with a detail object, both of which will be converted through toString(). |
static void |
warningToChannel(java.net.InetAddress host,
java.lang.Object logger,
java.lang.Object channel,
java.lang.Object message)
Logs a warning message to the given channel. |
static void |
warningToChannel(java.net.InetAddress host,
java.lang.Object logger,
java.lang.Object channel,
java.lang.Object message,
java.lang.Object detail)
Logs a warning message with a detail object to the given channel. |
static void |
warningToChannel(java.lang.Object logger,
java.lang.Object channel,
java.lang.Object message)
Logs a warning message to the given channel. |
static void |
warningToChannel(java.lang.Object logger,
java.lang.Object channel,
java.lang.Object message,
java.lang.Object detail)
Logs a warning message with a detail object to the given channel. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int DEBUG
public static final int INFO
public static final int WARNING
public static final int ERROR
public static final int FATAL
public static final int INHERIT_MASK
public static final java.lang.String DEFAULT_CHANNEL
public static final java.lang.String ALL_CHANNEL
public static int currentLogMask
public static java.lang.String SYSLOG_CHANNEL_NAME
public static Channel channel
public static final java.lang.String WARNING_PROPERTY
Constructor Detail |
protected Syslog()
Method Detail |
public static Syslog getInstance()
public static java.util.Map getWorkQueueMap()
com.protomatter.util.WorkQueue
object. You should never play with the queues -- this
method is provided so that external processes can monitor the
size of each queue by calling the getObjectPoolSize()
method on each queue. The map itself is read-only.public static java.net.InetAddress getLocalHostName()
public static void setFlushThreadInterval(long interval)
public static long getFlushThreadInterval()
public static void setLocalHostName()
public static void setLocalHostName(java.net.InetAddress host)
public static void setMasterSwitch(boolean value)
public static void addWork(java.lang.String queueName, java.lang.Runnable r)
public static final void addLogger(Syslogger log)
public static final boolean removeLogger(Syslogger log)
public static final void removeAllLoggers()
public static final java.util.Iterator getLoggers()
public static void shutdown()
public static final Syslogger getLogger(java.lang.String name)
public static final void setLogMask(int mask)
public static final void setLogMask(java.lang.String mask)
parseLogMask(java.lang.String)
public static final int parseLogMask(java.lang.String mask)
You can also pass in a list of levels, separated by commas and with an "=" before each level to select non-contiguous groups of levels. For instance, passing in "=INFO,=ERROR" will catch messages only at the INFO and ERROR levels, and NOTHING ELSE.
public static java.lang.String getLogMaskAsString()
public static java.lang.String getLogMaskAsString(int logMask)
public static final int getLogMask()
public static final int atOrAbove(int level)
public static final void log(java.net.InetAddress host, java.lang.Object logger, java.lang.Object msg, java.lang.Object detail, int level)
host
- The machine the log entry originated on.logger
- The object which is perfoming the log.
It's class name will be extracted and added to the log.msg
- A short message describing the log entry.detail
- A longer message with more information (can be null).level
- The level of the log entry.public static final void log(java.lang.Object logger, java.lang.Object msg, java.lang.Object detail, int level)
logger
- The object which is perfoming the log.
It's class name will be extracted and added to the log.msg
- A short message describing the log entry.detail
- A longer message with more information (can be null).level
- The level of the log entry.public static final void log(java.lang.Object logger, java.lang.Object channel, java.lang.Object msg, java.lang.Object detail, int level)
logger
- The object which is perfoming the log.
It's class name will be extracted and added to the log.channel
- The log channel to write to.msg
- A short message describing the log entry.detail
- A longer message with more information (can be null).level
- The level of the log entry.public static final void log(java.net.InetAddress host, java.lang.Object logger, java.lang.Object channel, java.lang.Object msg, java.lang.Object detail, int level)
host
- The host the log message originated on.logger
- The object which is perfoming the log.
It's class name will be extracted and added to the log.channel
- The log channel to write to.msg
- A short message describing the log entry.detail
- A longer message with more information (can be null).level
- The level of the log entry.public static final void log(java.net.InetAddress host, java.lang.Object logger, java.lang.Object channel, java.lang.Object msg, java.lang.Object detail, int level, java.lang.Thread thread, java.lang.String threadName, long messageSendTime)
host
- The host the log message originated on.logger
- The object which is perfoming the log.
It's class name will be extracted and added to the log.channel
- The log channel to write to.msg
- A short message describing the log entry.detail
- A longer message with more information (can be null).level
- The level of the log entry.thread
- The thread making the log call (null if remote)threadName
- The name of the thread making the log call.messageSendTime
- The time the message was sent.public static final void log(java.net.InetAddress host, java.lang.Object logger, java.lang.Throwable e)
public static final void log(java.net.InetAddress host, java.lang.Object logger, java.lang.Throwable e, int level)
public static final void log(java.lang.Object logger, java.lang.Throwable e)
public static final void log(java.lang.Object logger, java.lang.Throwable e, int level)
public static final void debug(java.net.InetAddress host, java.lang.Object logger, java.lang.Object message)
public static final void debug(java.net.InetAddress host, java.lang.Object logger, java.lang.Object message, java.lang.Object detail)
public static final void debugToChannel(java.net.InetAddress host, java.lang.Object logger, java.lang.Object channel, java.lang.Object message)
public static final void debugToChannel(java.net.InetAddress host, java.lang.Object logger, java.lang.Object channel, java.lang.Object message, java.lang.Object detail)
public static final void debug(java.lang.Object logger, java.lang.Object message)
public static final void debug(java.lang.Object logger, java.lang.Object message, java.lang.Object detail)
public static final void debugToChannel(java.lang.Object logger, java.lang.Object channel, java.lang.Object message)
public static final void debugToChannel(java.lang.Object logger, java.lang.Object channel, java.lang.Object message, java.lang.Object detail)
public static final void info(java.net.InetAddress host, java.lang.Object logger, java.lang.Object message)
public static final void info(java.net.InetAddress host, java.lang.Object logger, java.lang.Object message, java.lang.Object detail)
public static final void infoToChannel(java.net.InetAddress host, java.lang.Object logger, java.lang.Object channel, java.lang.Object message)
public static final void infoToChannel(java.net.InetAddress host, java.lang.Object logger, java.lang.Object channel, java.lang.Object message, java.lang.Object detail)
public static final void info(java.lang.Object logger, java.lang.Object message)
public static final void info(java.lang.Object logger, java.lang.Object message, java.lang.Object detail)
public static final void infoToChannel(java.lang.Object logger, java.lang.Object channel, java.lang.Object message)
public static final void infoToChannel(java.lang.Object logger, java.lang.Object channel, java.lang.Object message, java.lang.Object detail)
public static final void warning(java.net.InetAddress host, java.lang.Object logger, java.lang.Object message)
public static final void warning(java.net.InetAddress host, java.lang.Object logger, java.lang.Object message, java.lang.Object detail)
public static final void warningToChannel(java.net.InetAddress host, java.lang.Object logger, java.lang.Object channel, java.lang.Object message)
public static final void warningToChannel(java.net.InetAddress host, java.lang.Object logger, java.lang.Object channel, java.lang.Object message, java.lang.Object detail)
public static final void warning(java.lang.Object logger, java.lang.Object message)
public static final void warning(java.lang.Object logger, java.lang.Object message, java.lang.Object detail)
public static final void warningToChannel(java.lang.Object logger, java.lang.Object channel, java.lang.Object message)
public static final void warningToChannel(java.lang.Object logger, java.lang.Object channel, java.lang.Object message, java.lang.Object detail)
public static final void error(java.net.InetAddress host, java.lang.Object logger, java.lang.Object message)
public static final void error(java.net.InetAddress host, java.lang.Object logger, java.lang.Object message, java.lang.Object detail)
public static final void errorToChannel(java.net.InetAddress host, java.lang.Object logger, java.lang.Object channel, java.lang.Object message)
public static final void errorToChannel(java.net.InetAddress host, java.lang.Object logger, java.lang.Object channel, java.lang.Object message, java.lang.Object detail)
public static final void error(java.lang.Object logger, java.lang.Object message)
public static final void error(java.lang.Object logger, java.lang.Object message, java.lang.Object detail)
public static final void errorToChannel(java.lang.Object logger, java.lang.Object channel, java.lang.Object message)
public static final void errorToChannel(java.lang.Object logger, java.lang.Object channel, java.lang.Object message, java.lang.Object detail)
public static final void fatal(java.net.InetAddress host, java.lang.Object logger, java.lang.Object message)
public static final void fatal(java.net.InetAddress host, java.lang.Object logger, java.lang.Object message, java.lang.Object detail)
public static final void fatalToChannel(java.net.InetAddress host, java.lang.Object logger, java.lang.Object channel, java.lang.Object message)
public static final void fatalToChannel(java.net.InetAddress host, java.lang.Object logger, java.lang.Object channel, java.lang.Object message, java.lang.Object detail)
public static final void fatal(java.lang.Object logger, java.lang.Object message)
public static final void fatal(java.lang.Object logger, java.lang.Object message, java.lang.Object detail)
public static final void fatalToChannel(java.lang.Object logger, java.lang.Object channel, java.lang.Object message)
public static final void fatalToChannel(java.lang.Object logger, java.lang.Object channel, java.lang.Object message, java.lang.Object detail)
public static final boolean canLog(int level)
public static final boolean canDebug()
canLog(int)
public static final boolean canInfo()
canLog(int)
public static final boolean canWarning()
canLog(int)
public static final boolean canError()
canLog(int)
public static final boolean canFatal()
canLog(int)
public static final boolean mightLog(java.lang.Object logger, int level)
mightLog(Object, int, Object)
public static final boolean mightDebug(java.lang.Object logger)
mightLog(Object, int, Object)
public static final boolean mightInfo(java.lang.Object logger)
mightLog(Object, int, Object)
public static final boolean mightWarning(java.lang.Object logger)
mightLog(Object, int, Object)
public static final boolean mightError(java.lang.Object logger)
mightLog(Object, int, Object)
public static final boolean mightFatal(java.lang.Object logger)
mightLog(Object, int, Object)
public static final boolean mightDebug(java.lang.Object logger, java.lang.Object channel)
mightLog(Object, int, Object)
public static final boolean mightInfo(java.lang.Object logger, java.lang.Object channel)
mightLog(Object, int, Object)
public static final boolean mightWarning(java.lang.Object logger, java.lang.Object channel)
mightLog(Object, int, Object)
public static final boolean mightError(java.lang.Object logger, java.lang.Object channel)
mightLog(Object, int, Object)
public static final boolean mightFatal(java.lang.Object logger, java.lang.Object channel)
mightLog(Object, int, Object)
public static final boolean mightLog(java.lang.Object logger, int level, java.lang.Object channel)
Using the SimpleLogPolicy policy configured differently on five loggers and running JDK 1.2.2 on a RedHat 6.1 machine (PIII 550MHz, 512MB memory) it took between 50 and 200 milliseconds to call this method 1,000 times (between 0.2 and 0.05 milliseconds for each method call). Programmers writing custom log policies should take note that their implementation of the shouldLog() method must execute very quickly. If you're using the default policy, speed should not be an issue.
public static final boolean canLog(java.lang.Object logger, int level)
mightLog(Object, int)
public static final boolean canDebug(java.lang.Object logger)
mightDebug(Object)
public static final boolean canInfo(java.lang.Object logger)
mightInfo(Object)
public static final boolean canWarning(java.lang.Object logger)
mightWarning(Object)
public static final boolean canError(java.lang.Object logger)
mightError(Object)
public static final boolean canFatal(java.lang.Object logger)
mightFatal(Object)
public static void flush()
public static final java.util.ResourceBundle getResources()
public static final java.lang.String getResourceString(java.lang.String name)
|
Protomatter Software v1.1.7 Copyright 1998-2002 Nate Sammons |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Protomatter Software v1.1.7 | http://protomatter.sourceforge.net/1.1.7 |