Last active
March 24, 2019 08:11
-
-
Save guillermo-carrasco/0a92aeb38ab3b5c2cecc5c58b6b698b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: 1 | |
formatters: | |
custom_format: | |
format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s" | |
filters: | |
myapp: | |
name: myapp | |
handlers: | |
console: | |
class: logging.StreamHandler | |
formatter: custom_format | |
file: | |
class: logging.handlers.RotatingFileHandler | |
formatter: custom_format | |
filename: myapp.log | |
filters: [myapp] | |
maxBytes: 1024 | |
backupCount: 5 | |
loggers: | |
'': | |
handlers: [console] | |
level: INFO | |
myapp: | |
handlers: [file] | |
level: INFO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment