123456789101112131415161718192021222324252627 |
- package config
- import "gogs.baozhida.cn/zoie/OAuth-core/pkg/logger"
- type Logger struct {
- Type string
- Path string
- Level string
- Stdout string
- EnabledDB bool
- Cap uint
- MaxDays int
- }
- // Setup 设置logger
- func (e Logger) Setup() {
- logger.SetupLogger(
- logger.WithType(e.Type),
- logger.WithPath(e.Path),
- logger.WithLevel(e.Level),
- logger.WithStdout(e.Stdout),
- logger.WithCap(e.Cap),
- logger.WithMaxDays(e.MaxDays),
- )
- }
- var LoggerConfig = new(Logger)
|