[L] Change in pysim[master]: pySim-shell: add a logger class to centralize logging
Attention is currently required from: fixeria, laforge. Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/c/pysim/+/41229?usp=email to look at the new patch set (#7). The following approvals got outdated and were removed: Verified-1 by Jenkins Builder Change subject: pySim-shell: add a logger class to centralize logging ...................................................................... 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 --- M pySim-shell.py A pySim/log.py M pySim/runtime.py M tests/pySim-trace_test/pySim-trace_test_gsmtap.pcapng.ok A tests/unittests/test_log.py 5 files changed, 289 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/29/41229/7 -- To view, visit https://gerrit.osmocom.org/c/pysim/+/41229?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: newpatchset Gerrit-Project: pysim Gerrit-Branch: master Gerrit-Change-Id: I187f117e7e1ccdb2a85dfdfb18e84bd7561704eb Gerrit-Change-Number: 41229 Gerrit-PatchSet: 7 Gerrit-Owner: dexter <pmaier@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-CC: fixeria <vyanitskiy@sysmocom.de> Gerrit-CC: laforge <laforge@osmocom.org> Gerrit-Attention: laforge <laforge@osmocom.org> Gerrit-Attention: fixeria <vyanitskiy@sysmocom.de>
participants (1)
-
dexter