2
0
mirror of https://gitee.ltd/lxh/logger.git synced 2025-10-23 14:56:16 +08:00

🆕新增一个配置项,调控堆栈打印级别

This commit is contained in:
comma
2025-10-14 16:32:03 +08:00
parent b82db96722
commit 28c0c31ff9
5 changed files with 61 additions and 31 deletions

View File

@@ -21,6 +21,12 @@ func WithLevel(level string) Option {
}
}
func WithStackLevel(level string) Option {
return func(conf *Config) {
conf.Logger.StackLevel = level
}
}
func WithEnableFile(enable bool) Option {
return func(conf *Config) {
conf.File.Enable = enable