agi-med-common 2.2.0__tar.gz → 3.0.0__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.
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/PKG-INFO +1 -1
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/__init__.py +1 -1
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/logger/logger.py +3 -13
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common.egg-info/PKG-INFO +1 -1
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/README.md +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/pyproject.toml +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/requirements.txt +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/setup.cfg +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/logger/__init__.py +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/logger/log_level_enum.py +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/models/__init__.py +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/models/_base.py +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/models/base_config_models/__init__.py +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/models/base_config_models/gigachat_config.py +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/models/chat_item/__init__.py +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/models/chat_item/chat_item.py +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/models/chat_item/inner_context_item.py +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/models/chat_item/outer_context_item.py +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/models/chat_item/replica_item.py +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/models/chat_item_with_state/__init__.py +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/models/chat_item_with_state/chat_with_state.py +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/models/chat_item_with_state/inner_context_with_state.py +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/models/chat_item_with_state/replica_with_state.py +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/models/enums/__init__.py +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/models/enums/mtrs_label_enum.py +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/models/enums/states_enum.py +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/models/enums/track_id_enum.py +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/utils.py +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/validators.py +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common.egg-info/SOURCES.txt +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common.egg-info/dependency_links.txt +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common.egg-info/requires.txt +0 -0
- {agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common.egg-info/top_level.txt +0 -0
@@ -1,24 +1,14 @@
|
|
1
1
|
import sys
|
2
|
-
from uuid import UUID
|
3
2
|
|
4
3
|
from loguru import logger
|
5
4
|
|
6
5
|
from . import LogLevelEnum
|
7
6
|
|
8
7
|
|
9
|
-
def logger_init(
|
10
|
-
log_level: LogLevelEnum, service_name: str, include_outer_context: bool = True, include_extra_uuid: bool = True
|
11
|
-
) -> None:
|
8
|
+
def logger_init(log_level: LogLevelEnum) -> None:
|
12
9
|
logger.remove()
|
13
|
-
|
14
|
-
format_ =
|
15
|
-
extra: dict[str, UUID | str] = {"uuid": default_uuid}
|
16
|
-
if include_outer_context:
|
17
|
-
format_ = f"{format_} | {{extra[outer_context]}}"
|
18
|
-
extra["outer_context"] = default_uuid
|
19
|
-
if include_extra_uuid:
|
20
|
-
format_ = f"{format_} | {{extra[extra_uuid]}}"
|
21
|
-
extra["extra_uuid"] = default_uuid
|
10
|
+
extra = {"request_id": "NOT_A_REQUEST"}
|
11
|
+
format_ = "{time:DD-MM-YYYY HH:mm:ss} | {extra[request_id]}"
|
22
12
|
format_ = f"{format_} | <level>{{message}}</level>"
|
23
13
|
logger.add(sys.stdout, colorize=True, format=format_, level=log_level)
|
24
14
|
logger.configure(extra=extra)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/models/chat_item/__init__.py
RENAMED
File without changes
|
{agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/models/chat_item/chat_item.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/models/chat_item/replica_item.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/models/enums/mtrs_label_enum.py
RENAMED
File without changes
|
{agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/models/enums/states_enum.py
RENAMED
File without changes
|
{agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common/models/enums/track_id_enum.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{agi_med_common-2.2.0 → agi_med_common-3.0.0}/src/agi_med_common.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|