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

allow suppressing err #26

Open
celesteking opened this issue May 14, 2018 · 2 comments
Open

allow suppressing err #26

celesteking opened this issue May 14, 2018 · 2 comments

Comments

@celesteking
Copy link

Essentially, I'd like to purposely suppress messages like:
[fcrdns] queryA ESERVFAIL jaana24.stonemarketing.com.br which are triggered by connection.results.add(plugin, {err: err2[e].message})

I don't think error level is appropriate for irrelevant things.

Or, better yet, just allow specifying the level, like results.add(plugin, {err: blah, log_level: 'info'})

What do you think?

@msimerson
Copy link
Member

Results shouldn't be the arbiter of what is relevant.

Allowing a log level to be specified would be reasonable. It would still require modifying the caller. In the case you cited, wouldn't it be better to just modify the caller (fcrdns plugin) to: connection.results.add(plugin, {msg: err2[e].message})?

@celesteking
Copy link
Author

Wouldn't it be better -- I don't know. That will break any other plugin that relies on results structure set by respective plugin. I'll adjust fcrdns and submit a pull req. then. But still, allowing log_level to be set would be a wonderful addition. We can even call the param emit_log_level, to minimize the collision.

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

2 participants