Fork me on GitHub

Class comb.logging.appenders.Appender

Base class for all appenders
Defined in: appender.js.

Class Detail
comb.logging.appenders.Appender(options)
Parameters:
{Object} options Optional
options to assign to this Appender
{String} options.name Optional, Default: "appender"
the name of this Appender. If you want two of the same type of appender on a logger it must have a different name.
{String} options.pattern Optional, Default: "[{[yyyy-MM-ddTHH:mm:ss:SSS (z)]timeStamp}] {[- 5]levelName} {[-20]name} - {message}"

Available Options for formatting see comb.string.format for formatting options

  • timeStamp - the timestamp of the event being logged
  • level - the comb.logging.Level of the event
  • levelName - the name of the level being logged
  • name - the name of the logger logging the event
  • message - the message being logged
{comb.logging.Level|String} options.level Optional, Default: comb.logging.Level.INFO
the logging level of this appender

Note: the level can be different from the logger in the case that you want a particular logger to only log particular event of a level. For example an appender that only logs errors. BEWARE that if the appenders level is lower than the logger is will not receive any messages.

Field Detail
the level of this Appender.
{String} name
the name of this Appender.
{String} pattern
the pattern for this Appender.
Method Detail
append(event, level, name, message)
Appends a message to a log. This method is abstract and must be implemented in subclasses
Parameters:
{Object} event
the logging event to log.
{Date} event.timeStamp
the timeStamp of the event.
{comb.logging.Level} level
the level of the event.
{String} name
the name of the logger the event was emitted from.
{String} message
the message that is being logged.
throw new Error("abstract method");
				

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 31 2012 16:14:12 GMT-0600 (CST)