[Libre-soc-bugs] [Bug 1224] New: refactor logging
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Wed Nov 29 17:48:13 GMT 2023
https://bugs.libre-soc.org/show_bug.cgi?id=1224
Bug ID: 1224
Summary: refactor logging
Product: Libre-SOC's first SoC
Version: unspecified
Hardware: PC
OS: Windows
Status: CONFIRMED
Severity: major
Priority: ---
Component: Source Code
Assignee: lkcl at lkcl.net
Reporter: ghostmansd at gmail.com
CC: libre-soc-bugs at lists.libre-soc.org
NLnet milestone: ---
Expectations:
1. No sane logging should write to stdout. This is unconventional. At least
choose stderr by default. But preferably choose NOTHING (see item 2).
2. By default there's no need to write so much information unless explicitly
told.
3. There must be a possibility to tune the exact logging level per
component/subsystem. When debugging insndb, I don't want to see anything
related to SelectableInt.
4. There're standard ways of doing this. No, print is not the correct way to do
logging; it's good for casual debug. There's no need to reinvent the wheel,
Python already has a pretty well established logging.
5. Ideally the users should be able to switch the log destination, be it
syslog, file, stderr or anything else. For files we need append mode as well.
Problems with the current implementation:
1. It pollutes stdout for no good reason. Several command-line utilities using
stdout already have to deal with this annoying behaviour.
2. It's too verbose. The amount of information distracts the readers.
3. It reinvents the wheel. There are solutions to the same problem in Python.
Yes they ARE superior to print() invocation.
4. It leaves no options to have per-subsystem logging by other means than
making the underlying implementation aware of the subsystem. It should be up to
the subsystem which levels and options it supports.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list