HomePhabricator

Restructure logging

Description

Restructure logging

The output file for the normal database update run is currently 1,328,686 lines
out of which 1,282,521 are "Found unknown field on page". Setting logging levels
is the first step in making the logs useful for spotting actual errors.

pywikibot.output() has been replaced throughout by one of error(),
warning(), log() or debug(). Where unsure about the severity I have opted for
a more severe logging level, this can be revised later if needed.

When executed with the -log flag the warning() and error() will also output
to stdout whereas log() will only be outputted to the log file. For debug()
the execution must include the -debug flag.

Note that this has only been applied to python files called by
bin/update_monuments.sh

Bug: T138633
Change-Id: Ifc5e0ccf747033d10a87fbdadc408caf304ae665

Details

Provenance
Lokal_ProfilAuthored on Jun 24 2016, 10:27 AM
Parents
rTHER25ecfee9fc10: Merge "Recreate source table prior to run"
Branches
Unknown
Tags
Unknown
References
refs/changes/85/296885/1
ChangeId
Ifc5e0ccf747033d10a87fbdadc408caf304ae665