Skip to content

Instantly share code, notes, and snippets.

@alexmacniven
Created October 4, 2019 09:18
Show Gist options
  • Save alexmacniven/b1705b24271b7f0417232492deae74cf to your computer and use it in GitHub Desktop.
Save alexmacniven/b1705b24271b7f0417232492deae74cf to your computer and use it in GitHub Desktop.
Standard Logging Config for Python
[loggers]
keys=root
[handlers]
keys=fileHandler
[formatters]
keys=simpleFormatter
[logger_root]
level=DEBUG
handlers=fileHandler
[handler_fileHandler]
class=FileHandler
level=DEBUG
formatter=simpleFormatter
args=("~/logs/file.log",)
[formatter_simpleFormatter]
format=%(asctime)s %(name)s - %(levelname)s:%(message)s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment