Page MenuHomePhabricator

Filter debug log messages out of logs sent to disk
Closed, ResolvedPublicFeature

Description

It is nice to have really verbose logging available, but sending lots and lots of noise to disk every second isn't ideal.

[pod/phorge-78c48c4cbc-56xmc/job] 2024-03-06T00:39:29Z urllib3.connectionpool DEBUG: https://phabricator.wikimedia.org:443 "POST /api/feed.query HTTP/1.1" 200 58
[pod/phorge-78c48c4cbc-56xmc/job] 2024-03-06T00:39:29Z wikibugs2.phorge DEBUG: feed.query result: {'result': [], 'error_code': None, 'error_info': None}

This should also involve auditing log levels to see what should be raised to INFO or higher so that it does still persist to disk.

Details

TitleReferenceAuthorSource BranchDest Branch
Filter debug log messages out of logs sent to disktoolforge-repos/wikibugs2!13bd808work/bd808/T359230-debug-logsmain
Customize query in GitLab

Event Timeline

One way to expose control of this that might be cute would be to make the -v, --verbose flag's additive effect follow this progression:

  • no flag: log to disk and console at WARNING level (current behavior)
  • -v: log to disk and console at INFO level (current behavior)
  • -vv: log to disk at INFO level and console at DEBUG level (new behavior; current would log to both at DEBUG level)
  • -vvv: log to disk and console at DEBUG level (current behavior)

The change here at the code level would be deciding what level to set on the wikibugs2.wblogging.PrivateTimedRotatingFileHandler object used to manage disk logging. Currently we do an unconditional handler.setLevel(logging.DEBUG) so that anything that makes it past the root logger's level filter is recorded.

bd808 changed the task status from Open to In Progress.Mar 7 2024, 3:47 AM
bd808 claimed this task.
bd808 moved this task from Ready to Go to Doing on the Wikibugs board.