<p dir="ltr"><br>
On Mar 3, 2015 8:16 AM, "Didymus" <<a href="mailto:lynto28@gmail.com">lynto28@gmail.com</a>> wrote:<br>
> I did find that if I changed the "self.log" to "self._log" it works correctly but gives me a pylint warning about acccess to a protected member _log..<br>
><br>
> def pwarning(self, message, *args, **kws):<br>
>     """ Performance Warning Message Level """<br>
>     # Yes, logger takes its '*args' as 'args'.<br>
>     self._log(PWARNING_NUM, message, args, **kws)<br>
><br>
> Still wondering what the correct Pythonic way to handle this.</p>
<p dir="ltr">I believe the common approach is to let each module define and use its own hierarchical logger named after the module, rather than have them all share the root logger. This way the name that is logged is based on which logger was used for logging and doesn't rely on the "module" attribute, which is populated through the vagaries of stack inspection.</p>