work-zaplogger
Zap Logger interface for github.com/taylorchu/work
Example
import (
"go.uber.org/zap"
zaplogger "src.techknowlgick.com/work-zaplogger"
"github.com/taylorchu/work"
)
logger, _ := zap.NewProduction()
jobOpts := &work.JobOptions{
MaxExecutionTime: time.Minute,
IdleWait: 4 * time.Second,
NumGoroutines: 4,
HandleMiddleware: []work.HandleMiddleware{
zaplogger.HandleFuncLoggerZap(logger),
},
}
Credits/License
This project is a largely based on the existing logrus middleware implementation in work, which is licensed under the MIT license, so this project is also licensed under the MIT license to ensure compliance. A very big thank you to Taylor Chu for their work (no pun intended) on work.
You can see work, and it's documentation here: https://github.com/taylorchu/work