"Joseph L. Casale" <jcas...@activenetwerx.com> writes: >> I couldn't find any information on how to implement logging in a >> library that doesn't know the name of the application that uses >> it. How is that done?
> Create (get) a root logger (you don't have to use it) and set the > level, and attach a handler to it. Then get the logger your library > uses and set the level to what you want. So does that mean if we change the following code to get a logger without any name then it will work? Without any further change. >> logger = logging.getLogger('foo') >> logger.addHandler(ch) >> logger.setLevel(logging.DEBUG) -- Regards, Pankaj Jangid -- https://mail.python.org/mailman/listinfo/python-list