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

Non-error logs are printed to stderr #118

Open
ku1ik opened this issue Feb 3, 2022 · 2 comments
Open

Non-error logs are printed to stderr #118

ku1ik opened this issue Feb 3, 2022 · 2 comments

Comments

@ku1ik
Copy link

ku1ik commented Feb 3, 2022

As in title. This makes alerting configuration based on log severity problematic because everything seems to be an error. Most logging aggregation tools and platforms treat stderr output as level=error.

For example, "New tick of statistics from 10.9.1.100: 2497 ads blocked / 26870 total DNS queries" is not an error but it logged to stderr.

Steps for Reproduction

Run the exporter, redirect stderr to a file, observe all logs being saved there.

Expected behavior:

Informational logs are printed to stdout, and only errors are printed to stderr.

Actual behavior:

All logs, including informational, are printed to stderr.

Platforms:

Ubuntu 20.04, x86 64-bit

Versions:

0.1.1

@Galorhallen
Copy link
Contributor

This should be handled with #110, which also introduce log levels

@ku1ik
Copy link
Author

ku1ik commented Feb 10, 2022

Nice!

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