handle package:hslogger
Logs an event if it meets the requirements given by the most recent
call to
setLevel.
All log handlers should adhere to this.
This is the base class for the various log handlers. They should all
adhere to this class.
Creates a Growl handler. Once a Growl handler has been created,
machines that are to receive the message have to be specified.
Create a file log handler that uses hslogger priorities.
Create a stream log handler that uses hslogger priorities.
Create a stream log handler that uses log4j levels (priorities). The
priorities of messages are shoehorned into log4j levels as follows:
DEBUG -> DEBUG
INFO, NOTICE -> INFO
WARNING -> WARN
ERROR, CRITICAL, ALERT -> ERROR
EMERGENCY -> FATAL
This is useful when the log will only be consumed by log4j tools and
you don't want to go out of your way transforming the log or
configuring the tools.
Create a file log handler. Log messages sent to this handler will be
sent to the filename specified, which will be opened in Append mode.
Calling
close on the handler will close the file.
Create a stream log handler. Log messages sent to this handler will be
sent to the stream used initially. Note that the
close method
will have no effect on stream handlers; it does not actually close the
underlying stream.
Like
streamHandler, but note the priority and logger name along
with each message.
Allow graceful shutdown. Release all opened files, handlers, etc.
Remove a handler from the
Logger. Handlers are removed in the
reverse order they were added, so the following property holds for any
LogHandler h:
removeHandler . addHandler h = id
If no handlers are associated with the
Logger, it is returned
unchanged.
The root logger's default handler that writes every message to stderr
can be removed by using this function before any handlers have been
added to the root logger:
updateGlobalLogger rootLoggerName removeHandler
Set the
Logger's list of handlers to the list supplied. All
existing handlers are removed first.