Skip to content

Commit

Permalink
switch to logfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
emranemran committed Jan 30, 2025
1 parent 9623410 commit 8b9d947
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions runner/app/live/infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
def setup_logging(stream_id: Optional[str] = None) -> structlog.BoundLogger:
"""Setup structured logging with stream ID context"""

# Configure structlog to output JSON
# Configure structlog to output logfmt
structlog.configure(
processors=[
# Add timestamps
Expand All @@ -33,8 +33,8 @@ def setup_logging(stream_id: Optional[str] = None) -> structlog.BoundLogger:
structlog.processors.CallsiteParameterAdder(
parameters={"filename", "lineno"}
),
# Convert to JSON
structlog.processors.JSONRenderer()
# Convert to logfmt
structlog.processors.LogfmtRenderer()
],
# Output to stderr to match current [infer.py] prefix behavior
logger_factory=structlog.PrintLoggerFactory(sys.stderr),
Expand Down

0 comments on commit 8b9d947

Please sign in to comment.