Skip to content

Commit

Permalink
fix(py): Log to stderr not stdout
Browse files Browse the repository at this point in the history
  • Loading branch information
evanpurkhiser committed Oct 16, 2024
1 parent ace5b84 commit 413a671
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/sentry/runner/initializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import importlib.metadata
import logging
import os
import sys
from typing import IO, Any

import click
Expand Down Expand Up @@ -259,7 +260,10 @@ def configure_structlog() -> None:

kwargs["processors"].append(JSONRenderer())

structlog.configure(**kwargs)
structlog.configure(
logger_factory=structlog.PrintLoggerFactory(sys.stderr),
**kwargs,
)

lvl = os.environ.get("SENTRY_LOG_LEVEL")

Expand Down

0 comments on commit 413a671

Please sign in to comment.