Skip to content

Instantly share code, notes, and snippets.

View fabianbuechler's full-sized avatar

Fabian Büchler fabianbuechler

  • inoqo.com
  • Vienna
View GitHub Profile

Keybase proof

I hereby claim:

  • I am fabianbuechler on github.
  • I am fabianbuechler (https://keybase.io/fabianbuechler) on keybase.
  • I have a public key ASDNGnlE75iuDEQ72dHUE_8p8LTDZXKASQbM6icU-HFW-go

To claim this, I am signing this object:

@fabianbuechler
fabianbuechler / structlog_test.py
Last active January 9, 2023 11:47
Structlog to stdlib with different final processor as logging.Formatter
import logging
import json
import os
from pprint import pprint
import sys
import structlog
class ProcessorFormatter(logging.Formatter):
@fabianbuechler
fabianbuechler / structlog_config.py
Created May 23, 2016 12:55
structlog config for multiple handlers
processors = [
structlog.stdlib.add_logger_name,
structlog.stdlib.add_log_level,
structlog.stdlib.PositionalArgumentsFormatter(),
structlog.processors.TimeStamper(
fmt='%Y-%m-%d %H:%M:%S' if log_console else 'iso'),
structlog.processors.StackInfoRenderer(),
structlog.processors.format_exc_info,
]
if log_console: