Closed mambelli closed 3 years ago
I think we can skip the change from
logger = structlog.getLogger(CHANNELLOGGERNAME)
to
logger = structlog.getLogger(f"{CHANNELLOGGERNAME}.{__name__}")
in all three files.
The resulting output in the log file is cumbersome giving the full name of the module based on the path. It is also inconsistent with the names of the of the logger given by the other modules. If we want to do this, we should it everywhere (in a later PR).
There are still some bare logger.info calls in the modified glide_frontend_element.py Are we sure that is right? There were five originally and it looks like Marco's change only gets the first one.
There are still some bare logger.info calls in the modified glide_frontend_element.py Are we sure that is right? There were five originally and it looks like Marco's change only gets the first one.
He defines "logger" at the top of the module in line 21, so the module functions are all aware of the logger. In the class GlideFrontendElement
he sets the self.logger = logger, so it picks it up as well.
Looks good! I approve.
@goodenou you should approve in the "files changed" tab, otherwise, it is still blocked
Added module logger for functions in glide_frontend_element.py outside the class Renamed module loggers appending the module name for more granularity