Closed sboett-dev closed 2 months ago
Good point. We will come around to this eventually. Meanwhile of course, PRs welcome. I assume, the standard logging module (https://docs.python.org/3/library/logging.html) would be the preferred solution
We already use logging
in some downstream projects like
https://github.com/eclipse-kuksa/kuksa-can-provider/blob/main/dbcfeeder.py https://github.com/eclipse-kuksa/kuksa-dds-provider/blob/main/ddsprovider.py
Also in the "library parts" of the package we often already use logging.
So I think it is mostly the CLI-parts that use print, but it would indeed be good to integrate the logging framework there as well. One could discuss if we should add logging formatting to this repo, so that for example we can remove ColorFormatter
from https://github.com/eclipse-kuksa/kuksa-can-provider/blob/main/dbcfeeder.py#L101 and instead have it as a KuksaDefaultFormatter
that all providers and the CLI could use.
I will make an attempt on fixing this one
This Python package includes several
print
statements, e.g. here. It is not possible to set the logging level.It would be nice to be able to set the usual logging levels:
critical
,error
,warning
,info
,debug
.Example
During implementations with multiple connects and disconnects, the console gets spammed with
Thanks!