Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logging in Hapijs. #40

Open
ghost opened this issue Mar 10, 2015 · 3 comments
Open

Logging in Hapijs. #40

ghost opened this issue Mar 10, 2015 · 3 comments

Comments

@ghost
Copy link

ghost commented Mar 10, 2015

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
Copy link
Owner

nlf commented Mar 31, 2015

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
Copy link
Author

ghost commented Apr 1, 2015

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

@nlf
Copy link
Owner

nlf commented Apr 1, 2015

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant