Attention is currently required from: fixeria.
dexter has posted comments on this change by dexter. ( https://gerrit.osmocom.org/c/pysim/+/41890?usp=email )
Change subject: pySimLogger: user __name__ of the module when creating a new logger ......................................................................
Patch Set 2:
(4 comments)
File contrib/csv-to-pgsql.py:
https://gerrit.osmocom.org/c/pysim/+/41890/comment/092ac33a_b5dbcf88?usp=ema... : PS1, Line 15: __name__
See my comment in `pySim-shell.py`.
Done
https://gerrit.osmocom.org/c/pysim/+/41890/comment/e6685a48_90b09133?usp=ema... : PS1, Line 38: log = PySimLogger.get(__name__)
This becomes an equivalent of the logger above, and thus can be removed?
I remember having problems here. This code location was not able to access the globel log object. Maybe I should pass it with the constructor then?
File pySim-shell.py:
https://gerrit.osmocom.org/c/pysim/+/41890/comment/f880deed_9db762ad?usp=ema... : PS1, Line 77: __name__
Since this is the top level of the hierarchy, it's actually desirable to set the module name manuall […]
Done
File pySim/card_key_provider.py:
https://gerrit.osmocom.org/c/pysim/+/41890/comment/1512115e_105e32c1?usp=ema... : PS1, Line 41: PySimLogger.get
You no longer need to call `PySimLogger.get` here nor in other modules of the `pySim` namespace. […]
I gave this a try, but as it seems it is not the same.
With the log object from PySimLogger.get I get: WARNING: HELLO (in yellow)
With the log object from logging.getLogger I get HELLO (without color)