Skip to content

Commit

Permalink
日志级别解析加注释
Browse files Browse the repository at this point in the history
  • Loading branch information
walterlv committed Sep 12, 2024
1 parent 62db9ab commit 0ec017f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ internal static class LoggerStartup
internal partial class LoggerBridgeLinker;
```

当然,在你的应用程序中,日志级别通常不是写死在代码里的,往往需要从命令行参数、环境变量、配置文件等位置读取。那么可通过 `LogLevel.Parse` 方法将字符串解析为日志级别,相比于普通枚举的解析,此方法额外支持日志级别的常见别名。

### 日志过滤规则

当在命令行中传入 `--log-console-tags TagA,TagB` 时,将进行日志过滤,只输出包含 `TagA``TagB` 的日志。
Expand Down

0 comments on commit 0ec017f

Please sign in to comment.