This will allow bumping the verbosity level when debugging some loaders. And actually
lowering the current verbosity on existing loaders (e.g. cvs one) without losing the
possibility to be more verbose in debugging mode.
Related to T4229
Differential D7805
Allow setting up logging level in core loader ardumont on May 10 2022, 6:03 PM. Authored by
Details
This will allow bumping the verbosity level when debugging some loaders. And actually Related to T4229
Diff Detail
Event TimelineComment Actions Build is green Patch application report for D7805 (id=28200)Rebasing onto a3a2b11473... Current branch diff-target is up to date. Changes applied before testcommit d7591a6307471c6664b10334ceabd6c6b2effb4f Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Tue May 10 18:02:12 2022 +0200 Allow setting up logging level in core loader This will allow bumping the verbosity level when debugging some loaders. And actually lowering the current verbosity on existing loaders (e.g. cvs one) without losing the possibility to be more verbose in debugging mode. Related to T4214 See https://jenkins.softwareheritage.org/job/DLDBASE/job/tests-on-diff/785/ for more details. Comment Actions Build is green Patch application report for D7805 (id=28203)Rebasing onto a3a2b11473... Current branch diff-target is up to date. Changes applied before testcommit 7fdd135b0f32d85a2e5ac459b57e1b7673d72921 Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org> Date: Tue May 10 18:02:12 2022 +0200 Allow setting up logging level in core loader This will allow bumping the verbosity level when debugging some loaders. And actually lowering the current verbosity on existing loaders (e.g. cvs one) without losing the possibility to be more verbose in debugging mode. See https://jenkins.softwareheritage.org/job/DLDBASE/job/tests-on-diff/786/ for more details. Comment Actions I'm a bit uncomfortable with adding more ad-hoc logger.setLevel calls deep in SWH code (which then make reasoning about the logging config harder), rather than ripping it all apart and properly setting up the logging machinery "the python way" with a clean, explicit dictConfig (potentially pulled from a yaml file set as an envvar?). How does this interact with the swh.scheduler.celery_backend.config.setup_log_handler celery hook? I would expect that this will have no effect if the log handler (systemd or stdout) isn't set to allow DEBUG messages through. Comment Actions
quite true, i just adapted this as it's our current (bad apparently) way of doing it.
Well, sure, that's more involved than i currently aimed at but sure.
lol, i've no idea. And after reading it thrice, i'm not sure i understood everything quite as you intended. And thanks for the hints. Comment Actions Yeah, I'm not saying it should happen now, but the way this stuff has been handled has been inconsistent/painful/annoying me for a while, so maybe it's time? What I would like™ to see happen:
and finally
Comment Actions yeah, me too.
I'd say at least it's time for filing a task about it with your plan below (thanks for detailing it even further).
Definitely a clear plan worth following. [1] T4229 |