Skip to content

Instantly share code, notes, and snippets.

@4383
Created April 4, 2019 15:56
Show Gist options
  • Save 4383/35adef3861d86deefef9a740d815346a to your computer and use it in GitHub Desktop.
Save 4383/35adef3861d86deefef9a740d815346a to your computer and use it in GitHub Desktop.
log with python
import logging
logging.basicConfig()
logging.getLogger().setLevel(logging.DEBUG)
logging.getLogger('foo').debug('bah')
logging.getLogger().setLevel(logging.INFO)
logging.getLogger('foo').debug('debug')
logging.getLogger('foo').info('info')
logging.getLogger('foo').warn('warn')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment