Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

61 lines (52 sloc) 2.194 kb
/**
* Logule Config File
* Edit and put this file under your project's cwd to apply to all submodules within that dir.
* This config can be made global by placing it under $HOME
*/
module.exports = {
// delimiter to use between time, log level, namespace(s) and the message
delimiter : ' - '
// Levels and their log output delimiter color-method
, levels : {
trace : 'grey'
, debug : 'cyan'
, info : 'green'
, warn : 'yellow'
, error : 'red'
// special methods
, line : 'bold' // this method prepends the callsite
, zalgo : 'magenta' // this method gets extra 'formatting'
}
// misc colors
, prefixCol : 'blue'
, dateCol : 'grey'
, lineCol : 'green'
// extra styling
// critical errors in bold by default
, bold : ['error', 'zalgo']
// padding of the first namespace
, pad : 0
, formatting: {
// Date formatting type
dateType : 'plain'
// 'plain' -> HH:MM:SS via toLocaleTimeString
// 'precision' -> HH:MM:SS:MSS via toLocateTimeString + padded getMilliSeconds()
// 'method' -> efficient custom via method name on Date.prototype
// 'custom' -> allows a custom date string (slower)
// 'none' -> Don't prepend any time/date info
// options for dateType case 'method'
, dateMethod : 'valueOf' // perhaps try toISOString
// options for dateType case 'custom'
, showDate : true // prepend year month and day numbers before the time str
, reverseDate : false // reversed american DD MM YYYY or european YYYY MM DD
, dateDelim : '-' // delimiter to use for the date string when showDate
, showMs : false // append milliseconds to the time string
}
, nesting : 3 // maxmimum number of nested namespaces shown in output
// global log levels
, useAllow : false // if true, use 'allow' option, else use 'suppress' option
, suppress : ['debug', 'trace'] // every method on this list is suppressed
, allow : [] // every method in (levels \ this list) is suppressed
// JSON logging
, logFile : null // path to file (relative to this configs location)
};
Jump to Line
Something went wrong with that request. Please try again.