Created
February 23, 2014 13:12
-
-
Save borntyping/9171269 to your computer and use it in GitHub Desktop.
Better Python logging
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
def log(component, message, level='info'): | |
"Sends a log message with that component." | |
"If component is not a string, it's __qualname__ (__module__.__name__ + __name__) is used." | |
def create_log(component=None, level=None, ...): | |
"Creates a log that will use the given parameters." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment