Clean up logging output and remove redundant log messages

This commit is contained in:
yangdx
2025-02-27 20:17:28 +08:00
parent 05cf029bcc
commit 05d03638ec
3 changed files with 6 additions and 10 deletions

View File

@@ -61,9 +61,7 @@ def on_starting(server):
except ImportError:
print("psutil not installed, skipping memory usage reporting")
print("=" * 80)
print("Gunicorn initialization complete, forking workers...")
print("=" * 80)
def on_exit(server):

View File

@@ -92,8 +92,6 @@ class NetworkXStorage(BaseGraphStorage):
logger.info(
f"Loaded graph from {self._graphml_xml_file} with {preloaded_graph.number_of_nodes()} nodes, {preloaded_graph.number_of_edges()} edges"
)
else:
logger.info("Created new empty graph")
else:
preloaded_graph = NetworkXStorage.load_nx_graph(self._graphml_xml_file)
self._graph = preloaded_graph or nx.Graph()
@@ -101,7 +99,7 @@ class NetworkXStorage(BaseGraphStorage):
logger.info(
f"Loaded graph from {self._graphml_xml_file} with {preloaded_graph.number_of_nodes()} nodes, {preloaded_graph.number_of_edges()} edges"
)
else:
logger.info("Created new empty graph")
self._node_embed_algorithms = {

View File

@@ -107,9 +107,9 @@ def try_initialize_namespace(namespace: str) -> bool:
if namespace not in _init_flags:
_init_flags[namespace] = True
direct_log(f"Process {os.getpid()} ready to initialize namespace {namespace}")
direct_log(f"Process {os.getpid()} ready to initialize storage namespace: [{namespace}]")
return True
direct_log(f"Process {os.getpid()} namespace {namespace} already to initialized")
direct_log(f"Process {os.getpid()} storage namespace already to initialized: [{namespace}]")
return False
@@ -146,7 +146,7 @@ def get_namespace_object(namespace: str) -> Any:
else:
_share_objects[namespace] = None
direct_log(
f"Created namespace({namespace}): type={type(_share_objects[namespace])}, pid={os.getpid()}"
f"Created namespace: {namespace}(type={type(_share_objects[namespace])})"
)
return _share_objects[namespace]
@@ -169,7 +169,7 @@ def get_namespace_data(namespace: str) -> Dict[str, Any]:
else:
_shared_dicts[namespace] = {}
direct_log(
f"Created namespace({namespace}): type={type(_shared_dicts[namespace])}, pid={os.getpid()}"
f"Created namespace: {{namespace}}({type(_shared_dicts[namespace])}) "
)
return _shared_dicts[namespace]