liblogging 0.1.8__tar.gz → 0.1.9__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: liblogging
3
- Version: 0.1.8
3
+ Version: 0.1.9
4
4
  Summary: Utilities for logging and sending logs.
5
5
  Home-page: https://github.com/XoriieInpottn/liblogging
6
6
  Author: xi
@@ -51,22 +51,18 @@ class LogCollector:
51
51
  def collect(
52
52
  self, send_kafka: bool = False, chat_env: str = "dev", use_default_process: bool = True
53
53
  ):
54
- start_time = time.time()
55
54
  while True:
56
55
  try:
57
56
  line = sys.stdin.readline().strip()
58
57
  if not line:
59
58
  continue
60
- print(line)
61
- print(round(time.time() - start_time, 3))
62
- start_time = time.time()
63
59
  try:
64
60
  if use_default_process:
65
61
  trace_id, message = process_message(line)
66
62
  else:
67
63
  message = json.loads(line)
68
64
  trace_id = message.get("trace_id", "")
69
-
65
+ print(message)
70
66
  if send_kafka and trace_id:
71
67
  print(f"Sending kafka message. env:{chat_env}")
72
68
  thread_pool_manager.submit(
@@ -78,8 +74,8 @@ class LogCollector:
78
74
  key=trace_id,
79
75
  source=message.get("message_source")
80
76
  )
81
- except ValueError as e:
82
- pass
77
+ except ValueError:
78
+ print(line)
83
79
 
84
80
  except EOFError:
85
81
  print("End of input reached. Exiting...", file=sys.stderr)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: liblogging
3
- Version: 0.1.8
3
+ Version: 0.1.9
4
4
  Summary: Utilities for logging and sending logs.
5
5
  Home-page: https://github.com/XoriieInpottn/liblogging
6
6
  Author: xi
@@ -18,7 +18,7 @@ if __name__ == '__main__':
18
18
  'liblogging_collector = liblogging.sending.log_collector:main'
19
19
  ]
20
20
  },
21
- version='0.1.8',
21
+ version='0.1.9',
22
22
  description='Utilities for logging and sending logs.',
23
23
  long_description_content_type='text/markdown',
24
24
  long_description=long_description,
File without changes
File without changes
File without changes