Attention is currently required from: dexter, fixeria.

laforge 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:

(3 comments)

File contrib/csv-to-pgsql.py:

https://gerrit.osmocom.org/c/pysim/+/41890/comment/d39d8c3e_6c7fa219?usp=email :
PS1, Line 38: log = PySimLogger.get(__name__)
> I remember having problems here. This code location was not able to access 
> the globel log object. […]
this is odd, the code should have acces to global variabls of the same module.  
WE definitely don't want to pass the log object around explicitly.


File contrib/csv-to-pgsql.py:

https://gerrit.osmocom.org/c/pysim/+/41890/comment/806c0158_35bbe05a?usp=email :
PS2, Line 15: log = PySimLogger.get("csv-to-pqsql")
you can generalize this with
```
from pathlib import Path
print(Path(__file__).stem)
```

this way it automatically adjusts if we should ever rename the script file.


File contrib/es2p_server.py:

https://gerrit.osmocom.org/c/pysim/+/41890/comment/dfdb3b62_d0ef2dd2?usp=email :
PS2, Line 35: logger = logging.getLogger("es2p_server")
you can generalize this with
```
from pathlib import Path
print(Path(__file__).stem)
```

this way it automatically adjusts if we should ever rename the script file.



--
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: 2
Gerrit-Owner: dexter <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria <[email protected]>
Gerrit-CC: laforge <[email protected]>
Gerrit-Attention: fixeria <[email protected]>
Gerrit-Attention: dexter <[email protected]>
Gerrit-Comment-Date: Mon, 26 Jan 2026 18:33:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <[email protected]>
Comment-In-Reply-To: dexter <[email protected]>

Reply via email to