Logging vs printing
Sybren Stuvel
sybrenUSE at YOURthirdtower.com.imagination
Mon May 8 08:16:42 EDT 2006
Leo Breebaart enlightened us with:
> I think the main reason why I am not using it by default is because,
> when all is said and done, it still comes easier to me to resort to
> guarded print statements then to set up and use the logging
> machinery.
The logging "machinery" isn't that huge nor is it difficult to set up:
==================================================
import logging
logging.basicConfig()
log = logging.getLogger('your.module.name')
==================================================
and that's all there is to it.
Sybren
--
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself?
Frank Zappa
More information about the Python-list
mailing list