Skip to content

Instantly share code, notes, and snippets.

@oscaromeu
Created January 11, 2022 10:55
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 oscaromeu/310780a26c76d45896b2b9c76053f3cb to your computer and use it in GitHub Desktop.
Save oscaromeu/310780a26c76d45896b2b9c76053f3cb to your computer and use it in GitHub Desktop.
version: 1
disable_existing_loggers: false
formatters:
console:
format: '%(asctime)s.%(msecs)03d|%(levelname)s|%(name)s|%(process)d|%(processName)s|%(filename)s:%(lineno)s|%(message)s'
datefmt: '%Y-%m-%d %H:%M:%S'
consoleJson:
class: pythonjsonlogger.jsonlogger.JsonFormatter
format: '%(asctime)s.%(msecs)03d|%(levelname)s|%(name)s|%(process)d|%(processName)s|%(filename)s:%(lineno)s|%(message)s'
datefmt: '%Y-%m-%d %H:%M:%S'
handlers:
console:
class: logging.StreamHandler
formatter: consoleJson
root:
level: INFO
handlers: [console]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment