加入 连接状态判断 控制台日志输出

This commit is contained in:
2026-02-05 11:39:27 +08:00
parent f772e16119
commit 9e3a7d5721
7 changed files with 134 additions and 15 deletions

View File

@@ -36,13 +36,33 @@ abstract class Logger {
}
class LoggerConfig {
LoggerType type;
String host;
String serviceName;
Map<String, String>? lables;
bool print;
LoggerConfig(
{required this.host,
required this.serviceName,
{this.host = "",
this.serviceName = "",
this.type = LoggerType.LOKI,
this.print = false,
this.lables});
}
enum LoggerType {
LOKI,
CONSOLSE,
;
}
enum LoggerLevel {
debug(1),
info(2),
warning(3),
error(4),
off(5),
;
final int level;
const LoggerLevel(this.level);
}