Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What's wrong is giving slightly bad suggestions, like keeping a global 'logger' variable. There's absolutely no need to do that, just use a import logging ; getLogger(__name__) for example.

I usually have something like self.logger = logging.getLogger(__name__) on my classes __init__() within project/package (sub)modules .



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: