Skip to content

Instantly share code, notes, and snippets.

@FelipeBarrosCruz
Created April 5, 2024 16:30
Show Gist options
  • Save FelipeBarrosCruz/ece68f12aff7040f7c0ccbff4b08405d to your computer and use it in GitHub Desktop.
Save FelipeBarrosCruz/ece68f12aff7040f7c0ccbff4b08405d to your computer and use it in GitHub Desktop.
import structlog
structlog.configure(
processors=[
structlog.processors.TimeStamper(fmt="iso"),
structlog.processors.add_log_level,
structlog.processors.EventRenamer("msg"),
structlog.processors.JSONRenderer(),
]
)
def create_logger(**kwargs):
return structlog.get_logger(**kwargs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment