That doesn't seem like a very invasive change so if we adopt it we should adopt it everywhere in the same CL so people see the common pattern and use it.
I'm for using a named logger and would rather that it is per class instead of per module since many of the modules have lots of classes but +1 from me overall. On Tue, Nov 12, 2019 at 4:37 PM Pablo Estrada <[email protected]> wrote: > Hi all, > as of today, the Python SDK uses the root logger wherever we log. This > means that it's impossible to have different logging levels depending on > the section of the code that we want to debug most. > > I have been doing some work on the FnApiRunner, and adding logging for it. > I would like to start using a logger hierarchy, and slowly transition the > rest of the project to use per-module loggers. > > On each module, we could have a line like so: > > _LOGGER = logging.getLogger(__name__) > > and simply log everything on that _LOGGER. Is that an acceptable thing to > do for everyone? > > If I see no objections, I will change the FnApiRunner to use a logger like > this, and change other sections of the code as I interact with them. > Best > -P. >
