logging: getLogger() or getLogger(__name__)?

Malcolm Greene python at bdurham.com
Thu Jul 28 17:33:16 EDT 2016


Thank you Laurent!

----- Original message -----
From: Laurent Pointal <laurent.pointal at free.fr>

<snipped>
With __name__ you will have one logger per source file (module), with 
corresponding filtering possibilities, and organized hierarchically as
are 
packages (logging use . to built its loggers hierarchy). 

Without __name__, you have one global default logger.
</snipped>



More information about the Python-list mailing list