izihawa-loglib 1.1.14__py3-none-any.whl → 1.1.15__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.
@@ -44,3 +44,11 @@ class RequestContext:
44
44
  def error_log(self, e, level=logging.ERROR, **fields) -> None:
45
45
  all_fields = {**self.default_fields, **fields}
46
46
  error_log(e, level=level, **all_fields)
47
+
48
+ def to_default_headers(self) -> dict[str, Any]:
49
+ headers = {}
50
+ if request_id := self.default_fields.get("request_id"):
51
+ headers["X-Request-Id"] = request_id
52
+ if client_id := self.default_fields.get("client_id"):
53
+ headers["X-Client-Id"] = client_id
54
+ return headers
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: izihawa_loglib
3
- Version: 1.1.14
3
+ Version: 1.1.15
4
4
  Summary: Izihawa log utilities
5
5
  Author: Pasha Podolsky
6
6
  Author-email: ppodolsky@me.com
@@ -0,0 +1,7 @@
1
+ izihawa_loglib/__init__.py,sha256=E6ab53TTvjIwCOv8Wl8SbNyaPjXkOlim2fryehPgiEA,1005
2
+ izihawa_loglib/formatters.py,sha256=GXb7rQY4tMpjyvZb2oYpz5W1JwXZbOV0HpKp11gxsW0,2896
3
+ izihawa_loglib/handlers.py,sha256=GU7SLTgia1pgY9ufvUQSsMMEweaAGe6B7ibKn2wLb1I,1122
4
+ izihawa_loglib/request_context.py,sha256=h06z3p7ygx7EgkdlWqiyfLqgt_BRYP1tXs2tY4baYjg,1835
5
+ izihawa_loglib-1.1.15.dist-info/METADATA,sha256=tq1-atDG0EXTNJdS5D_pU9wLr3GUT5kZfD_Oy-Rncxw,658
6
+ izihawa_loglib-1.1.15.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
7
+ izihawa_loglib-1.1.15.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- izihawa_loglib/__init__.py,sha256=E6ab53TTvjIwCOv8Wl8SbNyaPjXkOlim2fryehPgiEA,1005
2
- izihawa_loglib/formatters.py,sha256=GXb7rQY4tMpjyvZb2oYpz5W1JwXZbOV0HpKp11gxsW0,2896
3
- izihawa_loglib/handlers.py,sha256=GU7SLTgia1pgY9ufvUQSsMMEweaAGe6B7ibKn2wLb1I,1122
4
- izihawa_loglib/request_context.py,sha256=fnFhByJ732LEe9KJOb64vu6TUjL4sj9gmcPcqH-fOMQ,1516
5
- izihawa_loglib-1.1.14.dist-info/METADATA,sha256=qGYWhmm4ztSt367kapgQgqGmYu2c4B0BJRULeS7QTc8,658
6
- izihawa_loglib-1.1.14.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
7
- izihawa_loglib-1.1.14.dist-info/RECORD,,