Closed jjakob closed 1 year ago
This is probably because I am using spsdk 1.10.0 instead of the pyproject.toml specified 1.7, the logger was added in spsdk 1.9.0. So it's not a problem when using the "correct" dependency versions, but will need to be adressed when updating the spsdk dependency.
This will be fixed in https://github.com/Nitrokey/pynitrokey/pull/364.
A lot of these debug messages are printed to the console, which means the progress bar is not visible and it quickly fills up the scrollback buffer of the terminal:
spsdk seems to default to no level (NOTSET) which means it logs everything https://github.com/nxp-mcuxpresso/spsdk/blob/2facbebd4e1f023099557803d163820e07937d1b/spsdk/__init__.py#L111
I found a way to set this to INFO, create
~/.spsdk/logging.yaml
which contains:After this only INFO level spsdk messages are printed:
It might make sense to set this to an even higher severity like WARNING, ERROR or CRITICAL. If debug messages are wanted, they could be saved to a log file in a tmpfs (like nitropy does to
/tmp/nitropy.log.*
) by adding a new handler to logging.yaml. Of course this should be configured by nitropy itself, if it can set imported spsdk logger config itself so that this config file is not needed. I'm not sure how or if a change in spsdk is needed.