Class Index | File Index

Classes


Class comb.logging.appenders.FileAppender


Extends comb.logging.appenders.Appender.
Appends messages to a file.

     var fileAppender = new comb.logging.appenders.FileAppender({
                                      file : "/var/log/myLog.log"
                                     });

Defined in: fileAppender.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Fields borrowed from class comb.logging.appenders.Appender:
level, name, pattern
Methods borrowed from class comb.logging.appenders.Appender:
append
Class Detail
comb.logging.appenders.FileAppender(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 recieve any messages.

{String} options.file Optional, Default: "./log.log"
the file to log events to.
{String} options.encoding Optional, Default: "utf8"
the encoding of the file.
{Boolean} options.overwrite Optional, Default: false
if true the log file is overwritten otherwise it is appended to.

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Oct 25 2011 13:20:07 GMT-0500 (CDT)