izihawa-loglib 1.1.18__py3-none-any.whl → 1.1.19__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.
@@ -9,7 +9,8 @@ class RequestContext:
9
9
  request_id_length: int = 12
10
10
 
11
11
  def __init__(
12
- self, **kwargs: Any,
12
+ self,
13
+ **kwargs: Any,
13
14
  ):
14
15
  self.default_fields = kwargs
15
16
  if not self.default_fields.get("request_id"):
@@ -22,7 +23,7 @@ class RequestContext:
22
23
  return self.default_fields[name]
23
24
  except KeyError:
24
25
  classname = type(self).__name__
25
- msg = f'{classname!r} object has no attribute {name!r}'
26
+ msg = f"{classname!r} object has no attribute {name!r}"
26
27
  raise AttributeError(msg)
27
28
 
28
29
  @staticmethod
@@ -44,11 +45,3 @@ class RequestContext:
44
45
  def error_log(self, e, level=logging.ERROR, **fields) -> None:
45
46
  all_fields = {**self.default_fields, **fields}
46
47
  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.18
3
+ Version: 1.1.19
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=CdeIbFm4HOcg81yfv7oRjawf_A6Mv5G06zRrW1JZY6o,2908
3
+ izihawa_loglib/handlers.py,sha256=GU7SLTgia1pgY9ufvUQSsMMEweaAGe6B7ibKn2wLb1I,1122
4
+ izihawa_loglib/request_context.py,sha256=VLwoUFcWVJ8cDNjVgGuv-RxKEDVbxZ4W-cG-LgKjMwg,1509
5
+ izihawa_loglib-1.1.19.dist-info/METADATA,sha256=7jIvLA3Krt4lnzk2b7bP10Axz2c3jn7ahoXFeNQqGjg,658
6
+ izihawa_loglib-1.1.19.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
7
+ izihawa_loglib-1.1.19.dist-info/RECORD,,
@@ -1,7 +0,0 @@
1
- izihawa_loglib/__init__.py,sha256=E6ab53TTvjIwCOv8Wl8SbNyaPjXkOlim2fryehPgiEA,1005
2
- izihawa_loglib/formatters.py,sha256=CdeIbFm4HOcg81yfv7oRjawf_A6Mv5G06zRrW1JZY6o,2908
3
- izihawa_loglib/handlers.py,sha256=GU7SLTgia1pgY9ufvUQSsMMEweaAGe6B7ibKn2wLb1I,1122
4
- izihawa_loglib/request_context.py,sha256=A3T-dsIytgRezhmxu0MdE6ZPc0ZYbuE-QGGIQOVY6q8,1820
5
- izihawa_loglib-1.1.18.dist-info/METADATA,sha256=rM6tLNelHiO9qyhWPRdYbO250ae1qwLWkNlHDAoG_CE,658
6
- izihawa_loglib-1.1.18.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
7
- izihawa_loglib-1.1.18.dist-info/RECORD,,