We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to use dict_tracebacks so that I can get logfire access to the exception key. Here is my list of processors
structlog.contextvars.merge_contextvars, structlog.processors.add_log_level, structlog.processors.dict_tracebacks, structlog.dev.set_exc_info, structlog.processors.TimeStamper(fmt="iso"), logfire.StructlogProcessor(), structlog.dev.ConsoleRenderer( colors=True, exception_formatter=RichTracebackFormatter(max_frames=1, show_locals=False, width=80) ),
I thought adding the structlog.dev.set_exc_info would cause exc_info to be set to True which would make it work with the ConsoleRenderer.
structlog.dev.set_exc_info
But it is being called with method error instead of exception which means it is not setting exc_info to True and this causes an error
TypeError: can only concatenate str (not "list") to str
File "/home/void/Projects/Python/chatpyre/.venv/lib/python3.12/site-packages/structlog/_native.py", line 45, in exception return self.error(event, *args, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/void/Projects/Python/chatpyre/.venv/lib/python3.12/site-packages/structlog/_native.py", line 134, in meth return self._proxy_to_logger(name, event, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/void/Projects/Python/chatpyre/.venv/lib/python3.12/site-packages/structlog/_base.py", line 214, in _proxy_to_logger args, kw = self._process_event(method_name, event, event_kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/void/Projects/Python/chatpyre/.venv/lib/python3.12/site-packages/structlog/_base.py", line 165, in _process_event event_dict = proc(self._logger, method_name, event_dict) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/void/Projects/Python/chatpyre/.venv/lib/python3.12/site-packages/structlog/dev.py", line 749, in __call__ sio.write("\n" + exc)
The text was updated successfully, but these errors were encountered:
dict-tracebacks are only meant to be used with JSON output. The Rich traceback printing has the same features but nicer looking. :-)
Sorry, something went wrong.
yeah, this is the dev module is for… development. :) what exactly are you trying to achieve here, practically speaking?
No branches or pull requests
I want to use dict_tracebacks so that I can get logfire access to the exception key.
Here is my list of processors
I thought adding the
structlog.dev.set_exc_info
would cause exc_info to be set to True which would make it work with the ConsoleRenderer.But it is being called with method error instead of exception which means it is not setting exc_info to True and this causes an error
TypeError: can only concatenate str (not "list") to str
The text was updated successfully, but these errors were encountered: