structlog-config 0.7.0__py3-none-any.whl → 0.8.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -62,12 +62,16 @@ def log_processors_for_mode(json_logger: bool) -> list[structlog.types.Processor
62
62
  structlog.processors.JSONRenderer(serializer=orjson_dumps_sorted),
63
63
  ]
64
64
 
65
+ # Passing None skips the ConsoleRenderer default, so use the explicit dev default.
66
+ exception_formatter = structlog.dev.default_exception_formatter
67
+
68
+ if packages.beautiful_traceback:
69
+ exception_formatter = beautiful_traceback_exception_formatter
70
+
65
71
  return [
66
72
  structlog.dev.ConsoleRenderer(
67
73
  colors=not NO_COLOR,
68
- exception_formatter=beautiful_traceback_exception_formatter
69
- if packages.beautiful_traceback
70
- else structlog.dev.default_exception_formatter,
74
+ exception_formatter=exception_formatter,
71
75
  )
72
76
  ]
73
77
 
@@ -77,6 +77,7 @@ def beautiful_traceback_exception_formatter(sio: TextIO, exc_info: ExcInfo) -> N
77
77
  from beautiful_traceback.formatting import exc_to_traceback_str
78
78
 
79
79
  _, exc_value, traceback = exc_info
80
+ assert traceback is not None
80
81
  # TODO support local_stack_only env var support
81
82
  formatted_exception = exc_to_traceback_str(exc_value, traceback, color=not NO_COLOR)
82
83
  sio.write("\n" + formatted_exception)
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: structlog-config
3
- Version: 0.7.0
3
+ Version: 0.8.0
4
4
  Summary: A comprehensive structlog configuration with sensible defaults for development and production environments, featuring context management, exception formatting, and path prettification.
5
5
  Keywords: logging,structlog,json-logging,structured-logging
6
6
  Author: Michael Bianco
7
7
  Author-email: Michael Bianco <mike@mikebian.co>
8
8
  Requires-Dist: orjson>=3.10.15
9
9
  Requires-Dist: python-decouple-typed>=3.11.0
10
- Requires-Dist: python-ipware>=3.0.0
10
+ Requires-Dist: fastapi-ipware>=0.1.1
11
11
  Requires-Dist: structlog>=25.2.0
12
12
  Requires-Dist: fastapi-ipware>=0.1.0 ; extra == 'fastapi'
13
13
  Requires-Python: >=3.11
@@ -1,15 +1,15 @@
1
- structlog_config/__init__.py,sha256=wTIMChYHwuzzgqoahCyF6YkJxjIYb-Gpyx8LkPkUpGk,6798
1
+ structlog_config/__init__.py,sha256=jTw47yiht0XmINIDUMicHZQYF_757ALXopxgOkAEhaQ,6939
2
2
  structlog_config/constants.py,sha256=O1nPnB29yZdqqaI7aeTUrimA3LOtA5WpP6BGPLWJvj8,510
3
3
  structlog_config/env_config.py,sha256=_EJO0rgAKndRPSh4wuBaH3bui9F3nIpn8FaEkjAjZso,1737
4
4
  structlog_config/environments.py,sha256=JpZYVVDGxEf1EaKdPdn6Jo-4wJK6SqF0ueFl7e2TBvI,612
5
5
  structlog_config/fastapi_access_logger.py,sha256=CYZsww0AIcdfrU5Wgr6POwdJxJ5vMB96ttsYqoE30BU,4363
6
- structlog_config/formatters.py,sha256=KJ3PlkrFva1RKz5SmFmEwVCqJuHxq3Qsqhd9ezB983I,6715
6
+ structlog_config/formatters.py,sha256=4B485qMTn9y5LqV7uWPJbgJrdIW5IiyRS3A0PEjcrS4,6748
7
7
  structlog_config/levels.py,sha256=LqXG4l01mIpxS2qI7PF_Vp9K7IrO0D5qU_x-Uo3LNuM,2372
8
8
  structlog_config/packages.py,sha256=xO4wHPIhAwGG6jv0kHdCr9NHpoIFx4VUeRzmztXp2is,591
9
9
  structlog_config/pytest_plugin.py,sha256=XBtef1KpuGV_RmXoWf13b0EUy69iAKMAk4-e5ZZnAuM,6819
10
10
  structlog_config/stdlib_logging.py,sha256=iHApYdsAs_ZC7Y8NpbKs23AHAJB1qLUCZPvFd-Nf_4I,7381
11
11
  structlog_config/trace.py,sha256=esSzTulaVr63H3iOYpHlU-NXPSwpEGS7GEYbv6Iq-3A,2118
12
12
  structlog_config/warnings.py,sha256=gKEcuHWqH0BaKitJtQkv-uJ0Z3uCH5nn6k8qpqjR-RM,998
13
- structlog_config-0.7.0.dist-info/WHEEL,sha256=4n27za1eEkOnA7dNjN6C5-O2rUiw6iapszm14Uj-Qmk,79
14
- structlog_config-0.7.0.dist-info/METADATA,sha256=yjnflk2btwm0xBy-0xRjhe8lwXPmsdToMx2Kn2doylU,10994
15
- structlog_config-0.7.0.dist-info/RECORD,,
13
+ structlog_config-0.8.0.dist-info/WHEEL,sha256=eh7sammvW2TypMMMGKgsM83HyA_3qQ5Lgg3ynoecH3M,79
14
+ structlog_config-0.8.0.dist-info/METADATA,sha256=SmpaIUr3-ELE2u_dOAvrVBJkj6IX33rVe-lZgz9PiCU,10995
15
+ structlog_config-0.8.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: uv 0.8.13
2
+ Generator: uv 0.8.24
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any