liblogging 0.1.11__tar.gz → 0.1.13__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
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: liblogging
3
- Version: 0.1.11
3
+ Version: 0.1.13
4
4
  Summary: Utilities for logging and sending logs.
5
5
  Home-page: https://github.com/XoriieInpottn/liblogging
6
6
  Author: xi
@@ -19,6 +19,7 @@ Dynamic: description
19
19
  Dynamic: description-content-type
20
20
  Dynamic: home-page
21
21
  Dynamic: license
22
+ Dynamic: license-file
22
23
  Dynamic: platform
23
24
  Dynamic: provides-extra
24
25
  Dynamic: summary
@@ -118,3 +119,4 @@ tee {log_file_path} 可以将你的程序记录(输出+错误)重定向到
118
119
  ## 💡Tips
119
120
 
120
121
  1. If using Kafka to send messages, please use `pip install liblogging[collector]`.
122
+ 2. 如果需要数据持久化,推荐日志消息都写在message列中,维护一列节省内存空间。需要后续进行查询的,以字典形式记录,比如logger.info({"key": "value"}), 便于后续查找。
@@ -92,4 +92,5 @@ tee {log_file_path} 可以将你的程序记录(输出+错误)重定向到
92
92
 
93
93
  ## 💡Tips
94
94
 
95
- 1. If using Kafka to send messages, please use `pip install liblogging[collector]`.
95
+ 1. If using Kafka to send messages, please use `pip install liblogging[collector]`.
96
+ 2. 如果需要数据持久化,推荐日志消息都写在message列中,维护一列节省内存空间。需要后续进行查询的,以字典形式记录,比如logger.info({"key": "value"}), 便于后续查找。
@@ -94,13 +94,14 @@ def main():
94
94
  )
95
95
  parser.add_argument("--ssl-cafile", type=str, required=True, help="ssl_cafile path")
96
96
  parser.add_argument(
97
- "--use-default-process",
98
- type=bool,
97
+ "--disable-default-process",
98
+ action='store_false',
99
+ dest='use_default_process',
99
100
  default=True,
100
- help="whether user default process. you can also use another function to process message by redirecting")
101
+ help="Disable default message processing. Use this flag when you want to process messages with your own function.")
101
102
 
102
103
  args = parser.parse_args()
103
-
104
+ print(args)
104
105
  log_collector = LogCollector(args)
105
106
  log_collector.collect(
106
107
  send_kafka=args.send_kafka, chat_env=args.env, use_default_process=args.use_default_process
@@ -58,7 +58,7 @@ def split_trace_id(trace_id: str, combine_symbol: str = "+") -> Tuple:
58
58
  if len(parts) == 3 or len(parts) == 4: # 包含时间戳时长度为4
59
59
  try:
60
60
  uid, session_id, turn = parts[:3]
61
- return trace_id, {"uid": uid, "session_id": session_id, "turn": turn}
61
+ return trace_id, {"uid": uid, "session_id": session_id, "turn": int(turn)}
62
62
  except ValueError:
63
63
  pass
64
64
  return trace_id, {}
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: liblogging
3
- Version: 0.1.11
3
+ Version: 0.1.13
4
4
  Summary: Utilities for logging and sending logs.
5
5
  Home-page: https://github.com/XoriieInpottn/liblogging
6
6
  Author: xi
@@ -19,6 +19,7 @@ Dynamic: description
19
19
  Dynamic: description-content-type
20
20
  Dynamic: home-page
21
21
  Dynamic: license
22
+ Dynamic: license-file
22
23
  Dynamic: platform
23
24
  Dynamic: provides-extra
24
25
  Dynamic: summary
@@ -118,3 +119,4 @@ tee {log_file_path} 可以将你的程序记录(输出+错误)重定向到
118
119
  ## 💡Tips
119
120
 
120
121
  1. If using Kafka to send messages, please use `pip install liblogging[collector]`.
122
+ 2. 如果需要数据持久化,推荐日志消息都写在message列中,维护一列节省内存空间。需要后续进行查询的,以字典形式记录,比如logger.info({"key": "value"}), 便于后续查找。
@@ -18,7 +18,7 @@ if __name__ == '__main__':
18
18
  'liblogging_collector = liblogging.sending.log_collector:main'
19
19
  ]
20
20
  },
21
- version='0.1.11',
21
+ version='0.1.13',
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