bucker icon indicating copy to clipboard operation
bucker copied to clipboard

Logging in Hapijs.

Open ghost opened this issue 9 years ago • 3 comments

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.

ghost avatar Mar 10 '15 10:03 ghost

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

nlf avatar Mar 31 '15 16:03 nlf

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

ghost avatar Apr 01 '15 09:04 ghost

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

nlf avatar Apr 01 '15 16:04 nlf