Searching on project for "getLogger" you find several modules using it as a modules variable. Some use LOGGER=geLog... and anothers use logger = getLog...
We should use the same name for it and this issue is for discuss, define it and make changes
Particularly I prefer _LOGGER. "_" because it shoul be used only on module's scope. UPPER CASE because once created it should not be chaged.
I personally vote for logger lowercase.
logger = logging.getLogger() it returns an instance of logging.RootLogger, and a custom object instance like that is not immutable as we can add more handlers and formatters to that, so using LOGGER looks like it is a constant which in my view stands better for builtin types and primary type objects.app.logger_SOMETHING even in standard library. (referring to the previous used _LOGGER)import logbook as logger logbook takes care of the configuration and module name initialization.My vote is for logger = logging.getLogger(__name__) which is a documentation recommendation, namespaces to loggers and make easy to see from what module the message came from.
Have we come to a define standard for this issue?
@SatelliteQE/robottelo-automation I'm giving a +1 to the lowercase.
Most helpful comment
I personally vote for logger lowercase.
logger = logging.getLogger()it returns an instance of logging.RootLogger, and a custom object instance like that is not immutable as we can add more handlers and formatters to that, so using LOGGER looks like it is a constant which in my view stands better for builtin types and primary type objects.app.logger_SOMETHINGeven in standard library. (referring to the previous used _LOGGER)import logbook as loggerlogbook takes care of the configuration and module name initialization.