Attention is currently required from: dexter.

fixeria 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 1:

(4 comments)

File contrib/csv-to-pgsql.py:

https://gerrit.osmocom.org/c/pysim/+/41890/comment/f4052dc8_95f1a433?usp=email :
PS1, Line 15: __name__
See my comment in `pySim-shell.py`.


https://gerrit.osmocom.org/c/pysim/+/41890/comment/f3d50379_6033ad63?usp=email :
PS1, Line 38: log = PySimLogger.get(__name__)
This becomes an equivalent of the logger above, and thus can be removed?


File pySim-shell.py:

https://gerrit.osmocom.org/c/pysim/+/41890/comment/404036ff_6b74e1e8?usp=email :
PS1, Line 77: __name__
Since this is the top level of the hierarchy, it's actually desirable to set 
the module name manually (e.g. `"pySim-shell"`) here. Otherwise it will show up 
as `__main__` in logging.

Same applies to `pySim-trace.py` and others, but AFAICS they're not using 
logging yet.


File pySim/card_key_provider.py:

https://gerrit.osmocom.org/c/pysim/+/41890/comment/02487ed1_7f3e06e2?usp=email :
PS1, Line 41: PySimLogger.get
You no longer need to call `PySimLogger.get` here nor in other modules of the 
`pySim` namespace. Instead, you can do the following:

```
import logging  # already imported above

log = logging.getLogger(__name__)
```

Being part of the module hierarchy, this module inherits logging configuration 
of the parent loggers. The only place where you'll still need to use the 
`PySimLogger` API is top-level scripts (entry-points) like `pySim-shell.py`.

This can be done in a separate patch.



--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41890?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I49a9beb98845f66247edd42ed548980c97a7151a
Gerrit-Change-Number: 41890
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria <[email protected]>
Gerrit-Attention: dexter <[email protected]>
Gerrit-Comment-Date: Tue, 20 Jan 2026 13:32:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No

Reply via email to