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

Add default tag mappings #7

Merged
merged 4 commits into from
May 26, 2016
Merged

Add default tag mappings #7

merged 4 commits into from
May 26, 2016

Conversation

jsumners
Copy link
Contributor

This PR adds default mappings for tags to log levels. This reduces the amount of configuration necessary to use the plugin in a standard logging style.

@mcollina
Copy link
Collaborator

👍 ! Good job.

Can you add this to the README?

I think we should also expose the default tags on a property of the module itself, so it's easier to extend.

@davidmarkclements
Copy link
Collaborator

on that shouldn't this be something like

Object.assign({}, defaultTags, options.tags)

So that if a user supplies {trace: 'foo'} then debug is still 'debug' etc.

@jsumners
Copy link
Contributor Author

@davidmarkclements well, the current implementation is an all or nothing situation. I simply replicated that. Do you guys want the supplied option to extend or replace the defaults?

@davidmarkclements
Copy link
Collaborator

..not sure - @mcollina ?

@mcollina
Copy link
Collaborator

I'd say let's extend the defaults :). Those are sound!

@jsumners
Copy link
Contributor Author

Okay, the defaults are now extended, the mappings exposed, and the documentation updated.

@mcollina mcollina merged commit afaf4a8 into hapijs:master May 26, 2016
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.

3 participants