Skip to content

Instantly share code, notes, and snippets.

@jhonata-menezes
Created January 17, 2019 17:28
Show Gist options
  • Select an option

  • Save jhonata-menezes/4ecbe4cd03eb79d97b8a49110c23cf71 to your computer and use it in GitHub Desktop.

Select an option

Save jhonata-menezes/4ecbe4cd03eb79d97b8a49110c23cf71 to your computer and use it in GitHub Desktop.
version: 1
disable_existing_loggers: False
formatters:
simple:
format: "%(asctime)s - %(filename)s - %(levelname)s - %(message)s"
handlers:
console:
class: logging.StreamHandler
level: INFO
formatter: simple
stream: ext://sys.stdout
info_file_handler:
class: logging.handlers.RotatingFileHandler
level: INFO
formatter: simple
filename: info.log
maxBytes: 10485760 # 10MB
backupCount: 10
encoding: utf8
sentry:
level: ERROR
class: raven.handlers.logging.SentryHandler
dsn:
logstash2:
level: INFO
class: logstash.TCPLogstashHandler
host: localhost
port: 5016
version: 1
loggers:
my_module:
level: ERROR
handlers: [console]
propagate: no
root:
level: INFO
handlers: [console, info_file_handler, sentry, logstash2]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment