logrus formatter easy.
.gitignore | ||
formatter_test.go | ||
formatter.go | ||
go.mod | ||
go.sum | ||
LICENSE | ||
README.md |
Sample Usage
Sample usage using available option to format output
package main
import (
"github.com/sirupsen/logrus"
"gitter.top/coco/lormatter"
)
func main() {
formatter := lormatter.Formatter{}
logrus.SetFormatter(formatter)
logrus.SetReportCaller(true)
logrus.Printf("Log message")
}
Above sample will produce:
[INFO] [2023-04-08 19:16:55.000] Log message