refactor(logging): preserve tracebacks and add channel context
- Preserve tracebacks: logger.error in except blocks → logger.exception - Channel context: BaseChannel injects self.logger = logger.bind(channel=name) - Third-party bridge: redirect_lib_logging() replaces ad-hoc stdlib-to-loguru bridges - Log levels: network timeouts downgraded from ERROR → WARNING - Fix --verbose flag to actually work with loguru (set handler to DEBUG)
This commit is contained in:
@@ -840,7 +840,7 @@ def _get_channel_info() -> dict[str, tuple[str, type[BaseModel]]]:
|
||||
display_name = getattr(channel_cls, "display_name", name.capitalize())
|
||||
result[name] = (display_name, config_cls)
|
||||
except Exception:
|
||||
logger.warning(f"Failed to load channel module: {name}")
|
||||
logger.warning("Failed to load channel module: {}", name)
|
||||
return result
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user