:memo:修改readme

This commit is contained in:
comma
2025-10-26 23:27:23 +08:00
parent 104a374382
commit 8772307630
2 changed files with 6 additions and 4 deletions

View File

@@ -84,10 +84,11 @@ if err := zap_logger.NewZapLogger("logger.yaml"); err != nil {
## 配置说明
### 全局配置 (logger)
| 字段名 | 类型 | 说明 | 可选值 | 默认值 |
|----------|--------|-------------------------------|------------------------|-----------|
| encoder | string | 全局日志编码器 | "json", "console" | "console" |
| level | string | 全局日志级别 | "debug", "info", "warn", "error", "dpanic", "panic", "fatal" | "info" |
| 字段名 | 类型 | 说明 | 可选值 | 默认值 |
|-------------|--------|----------|------------------------|-----------|
| encoder | string | 全局日志编码器 | "json", "console" | "console" |
| level | string | 全局日志级别 | "debug", "info", "warn", "error", "dpanic", "panic", "fatal" | "info" |
| stack_level | string | 全局堆栈打印级别 | "warn", "error", "dpanic", "panic", "fatal" | "panic" |
### 文件输出配置 (file)
| 字段名 | 类型 | 说明 | 默认值 |

View File

@@ -4,6 +4,7 @@ logger:
encoder: json
# 日志级别
level: info
# 堆栈打印级别
stack_level: panic
# 文件形式