Skip to content

Instantly share code, notes, and snippets.

@greatghoul
Created May 11, 2012 10:03
Show Gist options
  • Save greatghoul/2658720 to your computer and use it in GitHub Desktop.
Save greatghoul/2658720 to your computer and use it in GitHub Desktop.
logging.cfg
###############################################
[loggers]
keys=root
[logger_root]
level=INFO
handlers=console,file
###############################################
[handlers]
keys=console,file
[handler_console]
class=StreamHandler
level=DEBUG
formatter=console
args=(sys.stdout,)
[handler_file]
class=FileHandler
level=DEBUG
formatter=file
args=('crs.log', 'a')
###############################################
[formatters]
keys=console,file
[formatter_console]
format=%(levelname)-5s - %(message)s
[formatter_file]
format=%(asctime)s %(name)s:%(funcName)s %(pathname)s%(filename)s:%(lineno)s %(levelname)s - %(message)s
datefmt=%Y-%m-%d %H:%M:%S
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment