Skip to content

Commit 1cd62f1

Browse files
committed
fix: add logging for get_config() failure in Star class
1 parent a436094 commit 1cd62f1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

astrbot/core/star/base.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
from __future__ import annotations
22

3+
import logging
34
from typing import Any, Protocol
45

56
from astrbot.core import html_renderer
7+
8+
logger = logging.getLogger("astrbot")
69
from astrbot.core.utils.command_parser import CommandParserMixin
710
from astrbot.core.utils.plugin_kv_store import PluginKVStoreMixin
811

@@ -26,7 +29,8 @@ def _get_context_config(self) -> Any:
2629
if callable(get_config):
2730
try:
2831
return get_config()
29-
except Exception:
32+
except Exception as e:
33+
logger.debug(f"get_config() failed: {e}")
3034
return None
3135
return getattr(self.context, "_config", None)
3236

0 commit comments

Comments
 (0)