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
Change default logger level from WARNING to ERROR #6612
Comments
Here the warning messages are logged to the HTML output of the http://demo.piwik.org/index.php?module=API&method=CoreAdminHome.runScheduledTasks&format=csv&convertToUnicode=0&token_auth=trigger=archivephp HTTP request right? Maybe there should be different logger backends depending on the environment? I.e. it doesn't make sense to log to the HTML output in an HTTP request context, however it makes totally sense to log to stdout when we are in a CLI context. |
FYI, errors are always logged to the screen. The reason warnings are logged to the screen is because 'screen' is in log_writers setting in global.ini.php. |
Yeah a fatal error/uncatched exception is a special case from logging really. Warnings should be logged. And maybe we shouldn't take about "screen" because it's confusing. So what about setting different logging adapters/backends depending on the context?
|
… break the archiver (and not simple warnings)
I've changed default logger level to |
@mnapoli My comment wasn't an argument against your idea, just a note about the issue ;) |
@diosmosis yes sorry if my wording wasn't the best ;) I've opened a separate issue about the logger: #6622 |
Currently WARN level logs are logged to the screen: https://github.com/piwik/piwik/blob/master/config/global.ini.php#L54-L61
This is causing problems, for example
core:archive
command errors with:Which then fails the archiving.
To prevent WARNINGS message from failing the archiving, I propose to change default logger level to ERROR so only ERRORS are logged to screen. (helps us detect bugs faster as users will report them or learn from them and fix it themselves)
I had a look at other Log::warning and could see those to change from warning to error:
(Other Log::warning look like they are real warning and not errors.)
The text was updated successfully, but these errors were encountered: