Skip to main content
Stack Overflow
  1. About
  2. For Teams
Filter by
Sorted by
Tagged with
0 votes
0 answers
129 views

I wanted to override the structlog logger for the whole application, by doing this: import enum from collections.abc import Iterable import structlog from structlog.typing import Processor from ...
1 vote
1 answer
230 views

I'm using structlog in an application. When I use it to render an exception: logger = structlog.get_logger() logger.exception("boom") I get the expected pretty exception report. However ...
0 votes
1 answer
67 views

So the situation is the following: multiple internal packages written in python which do rarely log and if only use, these use the basic python logging module, since this is as far as I have read ...
1 vote
1 answer
218 views

I'm working on a Django project where logging is critical, and I'm using structlog to format and manage logs. The plan is to send these logs to ElasticSearch. However, I've encountered an issue: the ...
1 vote
1 answer
362 views

I'm looking to use structlog in a Python library, but would also like to transparently support the logging configuration set up by a containing application. In particular: if a log level is set (e.g. ...
ncoghlan's user avatar
  • 41.9k
0 votes
0 answers
960 views

We're using the logging module from the stdlib to send logs from our Django app to Datadog and we have customised our logging based on django-datadog-logger We're exploring a move to structlog, and I ...
0 votes
1 answer
669 views

I want to print out root logs in logfmt format. structlog also should print logs in the same format. I tried this example for JSON format and looks like it doesn't work with logfmt. Here is a first ...
rzlvmp's user avatar
  • 9,894
1 vote
1 answer
435 views

A common need when logging events is to provide more or less information depending on the log level. Consider the example below where some noisy payload should be included in the logs only if the log ...
Vincent's user avatar
  • 13.5k
0 votes
1 answer
600 views

I want to use structlog in a multiprocess application in python. The processes shall be able to log as well. Hence I need to ensure that writes to any I/O are process-safe. Python standard logging ...
1 vote
0 answers
125 views

I am writing a Pytest suite that generates a lot of logs with structured data from Structlog, but they are very noisy when printed to the console. I use the JSON report plugin, and I want to dump the ...
roegra's user avatar
  • 23
1 vote
2 answers
722 views

I have a working celery app. I want to add structured logging to it. A complete working example would be hard to provide, so let me demostrate: import structlog import logging logging.config....
dabljues's user avatar
  • 1,997
2 votes
1 answer
638 views

structlog.configure() seems to be the global setting. I need to create two different loggers with different settings.Hope someone can give me the right solution, thanks! logger1 = structlog.get_logger(...
Dankko's user avatar
  • 21
0 votes
1 answer
389 views

I am writing a test of an error condition, checking that it occurs and is handled. I don't want the test output to be spammed with error messages for errors that have been deliberately provoked and ...
1 vote
0 answers
446 views

Would anyone of you know how to use two different renderers in structlog? I'd like to use ConsoleRenderer with colors and nice formatting in console (on DEBUG) and also log same messages in log, ...
0 votes
1 answer
718 views

This import structlog from structlog.contextvars import bound_contextvars if __name__=="__main__": log = structlog.getLogger(__name__) with bound_contextvars(frame_id="ADA",...
WurmD's user avatar
  • 1,493

15 30 50 per page
1
2 3 4 5

AltStyle によって変換されたページ (->オリジナル) /