u
This commit is contained in:
1 parent
c6671c8a8c
commit
f0cb963d23
76 files changed
+6467
-498
No files matched your search
@@ -0,0 +1,18 @@
|
||||
package boots
|
||||
|
||||
import (
|
||||
"allapp-go/internal/config"
|
||||
"allapp-go/pkg/logger"
|
||||
)
|
||||
|
||||
func InitLogger(cfg *config.Config) {
|
||||
logger.Init(logger.Config{
|
||||
Dir: "logs",
|
||||
Level: "info",
|
||||
MaxSize: 100, // MB
|
||||
MaxBackups: 10,
|
||||
MaxAge: 7, // 天
|
||||
Compress: true,
|
||||
})
|
||||
defer logger.Sync()
|
||||
}
|
||||
Reference in new issue
Block a user