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

Custom logging #113

Merged
merged 4 commits into from
Dec 19, 2014
Merged

Custom logging #113

merged 4 commits into from
Dec 19, 2014

Conversation

AdamMagaluk
Copy link
Collaborator

Adds ability to setup custom logging, silent default console logging, and adds info, warn, error log levels. All old drivers will still work with the .log() on the runtime.

Runtime now has:

runtime.log('http_server', 'some log message', {data: 123}) // create an info level log message
runtime.info('http_server', 'some log message', {data: 123}) 
runtime.warn('http_server', 'some log message', {data: 123})
runtime.error('http_server', 'some log message', {data: 123})
// same as
runtime.log.emit('error', 'http_server', 'some log message', {data: 123})

Suppress logs:

zetta()
 .silent()
 .listen(3000);

Custom logging see: https://github.com/zettajs/zetta/blob/custom-logging/sample/CustomLogging/server.js

@mdobson
Copy link
Contributor

mdobson commented Dec 19, 2014

Looks fine. I'll update the doc, and then we can merge it in.

AdamMagaluk added a commit that referenced this pull request Dec 19, 2014
@AdamMagaluk AdamMagaluk merged commit 738eed7 into master Dec 19, 2014
@AdamMagaluk AdamMagaluk deleted the custom-logging branch December 19, 2014 15:43
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

Successfully merging this pull request may close these issues.

2 participants