refactor: 重命名 automation worker 为 general worker 并完善错误处理

This commit is contained in:
qzl
2026-04-01 17:24:52 +08:00
parent 0fe28a1c62
commit 24eda6ff51
19 changed files with 760 additions and 25 deletions
+11 -1
View File
@@ -72,8 +72,18 @@ class Logger {
required StackTrace stackTrace,
Map<String, dynamic>? extra,
}) {
final entry = LogEntry(
timestamp: DateTime.now(),
level: LogLevel.error,
message: message,
module: module,
errorType: error.runtimeType.toString(),
errorMessage: error.toString(),
stackTrace: stackTrace.toString(),
extra: extra,
);
if (_isNoOp) {
debugPrint('[$module] ERROR: $message, error: $error');
debugPrint(entry.toConsoleString());
return;
}
_service!.error(