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=ema... : 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=ema... : 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=ema... : 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.