Skip to content

Instantly share code, notes, and snippets.

@borntyping
Created February 23, 2014 13:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save borntyping/9171269 to your computer and use it in GitHub Desktop.
Save borntyping/9171269 to your computer and use it in GitHub Desktop.
Better Python logging
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