shadowshell 0.0.75__tar.gz → 0.0.77__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.
- {shadowshell-0.0.75 → shadowshell-0.0.77}/PKG-INFO +1 -1
- {shadowshell-0.0.75 → shadowshell-0.0.77}/pyproject.toml +1 -1
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell/logging/console_logger.py +8 -6
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell/logging/logging_constants.py +3 -1
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell/monitor/monitor.py +4 -9
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell.egg-info/PKG-INFO +1 -1
- {shadowshell-0.0.75 → shadowshell-0.0.77}/README.md +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/setup.cfg +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell/__init__.py +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell/boot/__init__.py +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell/boot/starter.py +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell/bootstrap.py +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell/config/__init__.py +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell/config/configurator.py +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell/configurator.py +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell/console_logger.py +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell/file/__init__.py +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell/file/file_util.py +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell/git_shell.py +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell/logger.py +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell/logger_factory.py +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell/logging/__init__.py +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell/logging/logger.py +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell/logging/logger_factory.py +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell/monitor/__init__.py +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell/serialize/__init__.py +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell/serialize/serializer.py +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell/serialize/serializer_factory.py +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell/serialize/serializer_json.py +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell/stock_trader.py +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell/test/__init__.py +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell/test/test.py +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell.egg-info/SOURCES.txt +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell.egg-info/dependency_links.txt +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell.egg-info/requires.txt +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/src/shadowshell.egg-info/top_level.txt +0 -0
- {shadowshell-0.0.75 → shadowshell-0.0.77}/tests/tests.py +0 -0
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "shadowshell" # 全局唯一名称(检查PyPI是否被占用)
|
|
7
7
|
#version = "0.0.41" # 版本号(每次更新需递增)
|
|
8
|
-
version = "0.0.
|
|
8
|
+
version = "0.0.77" # 版本号(每次更新需递增)
|
|
9
9
|
authors = [{ name = "shadowshell", email = "shadowshellxyz@foxmail.com" }]
|
|
10
10
|
description = "www.shadowshell.xyz"
|
|
11
11
|
readme = "README.md"
|
|
@@ -14,16 +14,18 @@ class ConsoleLogger(Logger):
|
|
|
14
14
|
|
|
15
15
|
def debug(self, content):
|
|
16
16
|
if LoggingConstants.LEVEL_DEBUG is True:
|
|
17
|
-
self.__log(content)
|
|
17
|
+
self.__log("DEBUG", content)
|
|
18
18
|
def info(self, content):
|
|
19
19
|
if LoggingConstants.LEVEL_INFO is True:
|
|
20
|
-
self.__log(content)
|
|
20
|
+
self.__log("INFO", content)
|
|
21
21
|
|
|
22
22
|
def warn(self, content):
|
|
23
|
-
|
|
23
|
+
if LoggingConstants.LEVEL_WARN is True:
|
|
24
|
+
self.__log("WARN", content)
|
|
24
25
|
|
|
25
26
|
def error(self, content):
|
|
26
|
-
|
|
27
|
+
if LoggingConstants.LEVEL_ERROR is True:
|
|
28
|
+
self.__log("ERROR", content)
|
|
27
29
|
|
|
28
|
-
def __log(self, content):
|
|
29
|
-
print("%s" % (content))
|
|
30
|
+
def __log(self, key, content):
|
|
31
|
+
print("[%s]%s" % (content))
|
|
@@ -8,8 +8,7 @@
|
|
|
8
8
|
import sys
|
|
9
9
|
import time
|
|
10
10
|
from shadowshell.logging import LoggerFactory
|
|
11
|
-
|
|
12
|
-
def __callback(request, response):
|
|
11
|
+
def callback(request, response):
|
|
13
12
|
logger = LoggerFactory.get_logger()
|
|
14
13
|
logger.info(f"[CALLBACK][Request]{__format_request(request)}[Response]{__format_response(response)}")
|
|
15
14
|
|
|
@@ -33,7 +32,7 @@ def performance_monitor(class_name = None):
|
|
|
33
32
|
return wrapper
|
|
34
33
|
return decorator
|
|
35
34
|
|
|
36
|
-
def function_monitor(class_name = None, callback =
|
|
35
|
+
def function_monitor(class_name = None, callback = None):
|
|
37
36
|
logger = LoggerFactory.get_logger()
|
|
38
37
|
def decorator(func):
|
|
39
38
|
def wrapper(*args, **kwargs):
|
|
@@ -73,14 +72,10 @@ def __get_service_name(class_name, func_name):
|
|
|
73
72
|
return service_name
|
|
74
73
|
|
|
75
74
|
def __format_request(request):
|
|
76
|
-
|
|
77
|
-
return None
|
|
78
|
-
return request.__dict__
|
|
75
|
+
return request
|
|
79
76
|
|
|
80
77
|
def __format_response(response):
|
|
81
|
-
|
|
82
|
-
return None
|
|
83
|
-
return response.__dict__
|
|
78
|
+
return response
|
|
84
79
|
def __record_digest_log(monitor_name, class_name, func_name, cost, is_successed):
|
|
85
80
|
logger = LoggerFactory.get_logger()
|
|
86
81
|
logger.info(f"[{monitor_name}][DIGEST_LOG][{__get_service_name(class_name, func_name)}]successed={is_successed}, cost:{cost:.6f}s.")
|
|
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
|
|
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
|
|
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
|
|
File without changes
|