dexter has uploaded this change for review.

View Change

pySim-shell: use log level INFO by default

The default log level of the PySimLogger is DEBUG by default. This is
to ensure that all messages are printed in an unconfigured setup.

However in pySim-Shell we care about configuring the logger, so let's
set the debug log level to INFO in startup. This will allow us to
turn debug messages on and off using the verbose switch.

Change-Id: I89315f830ce1cc2d573887de4f4cf4e19d17543b
Related: SYS#7725
---
M pySim-shell.py
1 file changed, 4 insertions(+), 1 deletion(-)

git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/79/41479/1
diff --git a/pySim-shell.py b/pySim-shell.py
index 8b0b58e..c629656 100755
--- a/pySim-shell.py
+++ b/pySim-shell.py
@@ -229,7 +229,7 @@
if new == True:
PySimLogger.set_level(logging.DEBUG)
else:
- PySimLogger.set_level()
+ PySimLogger.set_level(logging.INFO)

class Cmd2ApduTracer(ApduTracer):
def __init__(self, cmd2_app):
@@ -1144,6 +1144,9 @@
if (opts.verbose):
PySimLogger.set_verbose(True)
PySimLogger.set_level(logging.DEBUG)
+ else:
+ PySimLogger.set_verbose(False)
+ PySimLogger.set_level(logging.INFO)

# Register csv-file as card data provider, either from specified CSV
# or from CSV file in home directory

To view, visit change 41479. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I89315f830ce1cc2d573887de4f4cf4e19d17543b
Gerrit-Change-Number: 41479
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier@sysmocom.de>