nlf / bucker

A simple logging library for node.js
82 stars 28 forks source link

Logging in Hapijs. #40

Open ghost opened 9 years ago

ghost commented 9 years ago

Dear All,

I am trying to do logging in Hapijs with help of bucker. https://github.com/nlf/bucker but it only shows time.

For example: logger.log('node updated'); 13:34:10 info: node updated

Is there any possibility that it shows DATE along with it.

nlf commented 9 years ago

sorry for the incredibly delayed response, but yes you can override the timestamp format. here's an example:

var logger = Bucker.createLogger({ console: { timestamp: 'MM/DD/YY HH:mm:ss' } });

the timestamp option accepts any parameters that are valid in moment.js

ghost commented 9 years ago

Thanks Nathan, Is there any way to add client's IP address in this logging.

nlf commented 9 years ago

to general log messages? not currently, no. that's a feature i'm working on for 2.0 though.