Skip to content
gojuukaze edited this page Aug 27, 2022 · 2 revisions

write to file

import (
"github.com/gojuukaze/YTask/v3/log"
"github.com/gojuukaze/go-watch-file")


file,err:=watchFile.OpenWatchFile("xx.log")
if err != nil {
	panic(err)
}
log.YTaskLog.SetOutput(file)

set level

log.YTaskLog.SetLevel(logrus.InfoLevel)