Class: AlertAppender


AlertAppender extends SimpleLogAppender and implements publishing of log messages by issuing the specific browser alert. AlertAppender instance objects can be configured with a window dimension, so as to wait for the specified number of messages before sending an alert.

new AlertAppender(level, category, dim)

Constructor for AlertAppender.
Name Type Argument Description
level String <optional>
The threshold level at which the SimpleLogAppender is created. It should be one of "DEBUG", "INFO", "WARN", "ERROR" and "FATAL". If not or wrongly specified INFO is assumed.
category String <optional>
The category this appender should listen to. If not specified the appender will get log for every available category. See SimpleLogAppender#setCategoryFilter.
dim int <optional>
Number of log messages to wait before sending a cumulative alert. This parameter is optional, if lower than 1 or no value is passed, 5 is assumed.


Method Summary

Add a log message in a AlertAppender private instance.

Inherited Methods

composeLine getCategoryFilter getLevel setCategoryFilter setLevel setLoggerProvider

Method Detail

log(category, level, mex, header)

Add a log message in a AlertAppender private instance. If the accumulated messages exceed the limit a show alert function is called.
Name Type Description
category String the logger category that produced the given message.
level String the logging level of the given message. It should be one of DEBUG INFO WARN ERROR FATAL.
mex String the message to be logged. It could be a String instance, an Error instance or any other object, provided that it has a toString method.
header String a header for the message