feat:update log
This commit is contained in:
1 parent
0768efbcb3
commit
f3adadd6ef
20 files changed
+194
-146
No files matched your search
@@ -0,0 +1,21 @@
|
||||
package config
|
||||
|
||||
import "github.com/spf13/viper"
|
||||
|
||||
type Logger struct {
|
||||
Path string
|
||||
Level string
|
||||
Stdout bool
|
||||
Enabled bool
|
||||
}
|
||||
|
||||
func InitLog(cfg *viper.Viper) *Logger {
|
||||
return &Logger{
|
||||
Path: cfg.GetString("path"),
|
||||
Level: cfg.GetString("level"),
|
||||
Enabled: cfg.GetBool("enabled"),
|
||||
Stdout: cfg.GetBool("stdout"),
|
||||
}
|
||||
}
|
||||
|
||||
var LoggerConfig = new(Logger)
|
||||
Reference in new issue
Block a user