Skip to content
Failed

Changes

Summary

  1. pySim-shell: add a logger class to centralize logging (details)
Commit 6760653252f91b376b3c84157e8979edbbbd3abf by pmaier@sysmocom.de
pySim-shell: add a logger class to centralize logging

In many sub modules we still use print() to occassionally print status
messages or warnings. This technically does not hurt, but it is an unclean
solution which we should replace with something more mature.

Let's use python's built in logging framework to create a static logger
class that fits our needs. To maintain compatibility let's also make sure
that the logger class will behave like a normal print() statement when no
configuration parameters are supplied by the API user.

To illustrate how the approach can be used in sub-modules, this patch
replaces the print statements in runtime.py. The other print statements
will the be fixed in follow-up patches.

Related: OS#6864
Change-Id: I187f117e7e1ccdb2a85dfdfb18e84bd7561704eb
The file was modifiedpySim-shell.py
The file was modifiedtests/pySim-trace_test/pySim-trace_test_gsmtap.pcapng.ok
The file was modifiedpySim/runtime.py