Skip to content

Kickq Logger Facility

Thanasis Polychronakis edited this page Apr 30, 2013 · 4 revisions

Kickq uses the node-logg package which is based on the JAVA Logging API. Kickq exposes the node-logg on the logg property:

kickq.logg

Kickq generates all types of messages from debugging up to severe errors. These logging messages can be consumed on the console, in syslog, in a file or as events.

Configuring The Logger

The detailed configuration options for the logger can be found in the Kickq Configuration page. Bellow is a summary of the options:

// Log to console, uses the loggerLevel, default "false".
kickq.config('loggerConsole', false);


// The minimum Logging Level messages that kickq will emit. The `debug` option overwrites this to `0`.
kickq.config('loggerLevel', kickq.LogLevel.WARN);


// Save the log to syslog.
kickq.config('loggerSyslog', true);

// Save the log to file. By default **warning** or **severe** level messages are saved, use the `loggerFileLevel` to set the verbosity.
kickq.config('loggerFile', false);

// The logging file name.
kickq.config('loggerFilename', './log/kickq.log');

You can access the logger events by using the exposed kickq.logg package.

kickq.logg.on('', function(logRecord){/* ... */});
Clone this wiki locally