Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upChange --log.level=info to --log.level=warn in Dockerfile #3386
Comments
This comment has been minimized.
This comment has been minimized.
|
It's good for applications to be verbose at startup, as it's a great aid with debugging issues then. The startup information is all quite important for us when dealing with user support requests and thus info should remain the default. The logs here are extremely light as startup logs go, though there's some work in progress to expand them a bit. |
This comment has been minimized.
This comment has been minimized.
|
But don't they fall under 'surprising'? If the intention is that things should start, what is the value of having the lines say that everything went as intended? I expect an error would be printed otherwise? Having Prometheus version logged is ofc interesting, and it might also be valuable to list host details. But it does seem fairly verbose.
Should be an error message if that doesn't succeed?
Failed to start target manager?
Failed to start TSDB?
Error if config could not be read, othewise it loads what the user requested, or what --help says is default.
Server startup failed |
This comment has been minimized.
This comment has been minimized.
So we can tell where things got stuck. |
This comment has been minimized.
This comment has been minimized.
|
So the main reason for these INFO logs being the default everywhere is to be able to debug Prometheus when it hangs, in situations where it does not hang during startup if restarting with |
This comment has been minimized.
This comment has been minimized.
|
Info is generally the default for logging. These log lines are info so we can debug hangs, as getting users to change log levels (especially for rarely occurring issues) can be difficult. |
This comment has been minimized.
This comment has been minimized.
|
Yeah, I know, changing log levels does lack some usability ;) |
dsvensson
closed this
Nov 1, 2017
This comment has been minimized.
This comment has been minimized.
lock
bot
commented
Mar 23, 2019
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
dsvensson commentedNov 1, 2017
•
edited
What did you do?
Started prometheus under docker-compose.
What did you expect to see?
Nothing.
What did you see instead? Under which circumstances?
Lots of log INFO's that I want to hide.
Environment
prom/prometheus docker container.
System information:
docker
Prometheus version:
2.0.0-rc2
Logs:
Final attempt. As there are good arguments for not controlling log level via configuration (#3384), and opinionated reasons for not giving docker-compose control over the command line arguments in the upstream prom/prometheus container (#3385), then perhaps the Dockerfile log level can be changed to
warnunder the flag of Basics of the Unix Philosophy: