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

Log level inflation: debugging data is output as info #143

Open
majick opened this issue Aug 16, 2022 · 1 comment
Open

Log level inflation: debugging data is output as info #143

majick opened this issue Aug 16, 2022 · 1 comment

Comments

@majick
Copy link

majick commented Aug 16, 2022

It's always something of a subjective thing, but by and large a UNIX program should produce no output if it is successful in the most expected way. It should emit info if something interesting happened, and warn or error if something unexpected happened. The below log lines fall into none of those categories and are, frankly, debugging output:

Aug 16 07:39:55 adorable pihole_exporter-linux-arm[24727]: time="2022-08-16T07:39:55-07:00" level=info msg="request.Header: map[Accept:[application/openmetrics-text;version=1.0.0,application/openmetrics-text;version=0.0.1;q=0.75,text/plain;version=0.0.4;q=0.5,*/*;q=0.1] Accept-Encoding:[gzip] User-Agent:[Prometheus/2.37.0] X-Prometheus-Scrape-Timeout-Seconds:[10]]\n"
Aug 16 07:39:55 adorable pihole_exporter-linux-arm[24727]: time="2022-08-16T07:39:55-07:00" level=info msg="Collecting from 127.0.0.1"
Aug 16 07:39:55 adorable pihole_exporter-linux-arm[24727]: time="2022-08-16T07:39:55-07:00" level=info msg="New tick of statistics from 127.0.0.1: 1936 ads blocked / 3313 total DNS queries"

My case for each of these log lines to be debugging output that is suppressed:

  1. A request header is unambiguously debug output that should never be written to disk.
  2. The daemon is doing it's job, collecting. That's probably not worth wearing a hole in one of my flash cells every 60 seconds about.
  3. The statistics printed here are, quite literally, the data that the daemon is going to offer my scraper. There might be a reasonable debate to be had about logging whenever the data changes but I'm pretty sure it's going to change any time FTL is polled and is pretty unremarkable information.

Over 90% of the contents of daemon.log are from pihole_exporter because of pointless log spam.

@moritzj29
Copy link

would be really nice to be able to set the log level

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