Skip to content

Instantly share code, notes, and snippets.

@jmuhlich
Created May 15, 2016 01:16
Show Gist options
  • Save jmuhlich/38a88505e4cf0dc5bec33ba828734947 to your computer and use it in GitHub Desktop.
Save jmuhlich/38a88505e4cf0dc5bec33ba828734947 to your computer and use it in GitHub Desktop.
python logging minimal example
import logging
logger = logging.getLogger(__name__)
def foo(a, b):
logger.info('foo(%s, %s)', a, b)
import logging
import mymod
logging.basicConfig(level=logging.INFO)
mymod.foo("hello world!", 42)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment