Human

Extends caterpillar.Transform

./source/index.js

Convert Logger entries into human readable format. Extends http://rawgit.com/bevry/caterpillar/master/docs/index.html#Transform

Examples

const logger = require('caterpillar').create()
logger.pipe(require('caterpillar-human').create()).pipe(process.stdout)
logger.log('info', 'some', {data: 'oh yeah'}, 42)

Instance members

#format(message)

Convert a logger entry into a human readable format

format(message)

./source/index.js

Convert a logger entry into a human readable format

Parameters

Returns

string
#formatArguments(args)

Convert logger entry arguments into a human readable string

formatArguments(args)

./source/index.js

Convert logger entry arguments into a human readable string

Parameters

Returns

string
#formatDate(datetime)

Convert a datetime into a human readable format

formatDate(datetime)

./source/index.js

Convert a datetime into a human readable format

Parameters

Returns

string
#getColor(levelNumber)

Get the color for the log level

getColor(levelNumber)

./source/index.js

Get the color for the log level

Parameters

Returns

string
#getInitialConfig

Get the initial configuration.

getInitialConfig

./source/index.js

Get the initial configuration.

Returns

Object
#padLeft(padding, size, content)

Pad the left of some content if need be with the specified padding to make the content reach a certain size

padLeft(padding, size, content)

./source/index.js

Pad the left of some content if need be with the specified padding to make the content reach a certain size

Parameters

Returns

string