Skip to content

Instantly share code, notes, and snippets.

@Seolhun
Last active August 18, 2017 06:44
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 Seolhun/c408a879b90913633e854a259f2ba002 to your computer and use it in GitHub Desktop.
Save Seolhun/c408a879b90913633e854a259f2ba002 to your computer and use it in GitHub Desktop.
Python Logging.json
{
"version": 1,
"formatters": {
"simple": {
"format": "%(asctime)s %(name)-15s %(levelname)-8s %(processName)-10s %(message)s"
}
},
"handlers": {
"console": {
"class": "logging.StreamHandler",
"level": "INFO",
"formatter": "simple",
"stream": "ext://sys.stdout"
},
"info_file_handler": {
"class": "logging.handlers.RotatingFileHandler",
"level": "DEBUG",
"formatter": "simple",
"filename": "logs/app-tracked.log",
"maxBytes": 10485760,
"backupCount": 10,
"encoding": "utf-8"
}
},
"root": {
"level": "DEBUG",
"handlers": [
"console",
"info_file_handler"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment