Created
December 16, 2010 16:59
-
-
Save jk0/743648 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
def logger(name, debug=False): | |
"""Log handler""" | |
logging.basicConfig( | |
level=logging.DEBUG if debug else logging.INFO, | |
format="%(asctime)s [%(name)s] %(message)s", | |
datefmt="%H:%M:%S") | |
return logging.getLogger(name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment