Skip to content

winking324/rzap-gin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rzap-gin

Replace the log output of gin with zap

How to install

go get github.com/winking324/rzap-gin

How to use

rzap.NewGlobalLogger([]zapcore.Core{
    rzap.NewCore(&lumberjack.Logger{
        Filename: "/your/log/path/app.log",
    }, zap.InfoLevel),
})

r := gin.New()
r.Use(rzap_gin.Logger(nil), rzap_gin.Recovery(nil, false))

About

Replace the log output of gin with zap

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages