# logrus-formatter **Repository Path**: weidongkl/logrus-formatter ## Basic Information - **Project Name**: logrus-formatter - **Description**: Defining Logrus log format to include file and line number - **Primary Language**: Go - **License**: MIT - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 3 - **Forks**: 0 - **Created**: 2023-05-30 - **Last Updated**: 2026-08-31 ## Categories & Tags **Categories**: Uncategorized **Tags**: logrus, formatter, Go语言 ## README # logrus-formatter The formatter of logrus, like python's logging. ``` [INFO] 2023-05-30 05:59:28,99 [xx.go:40]: messags ``` ## Installation `go get gitee.com/weidongkl/logrus-formatter` ## Usage ```go package main import ( formatter "gitee.com/weidongkl/logrus-formatter" "github.com/sirupsen/logrus" ) func main() { log := logrus.New() log.SetReportCaller(true) log.SetFormatter(&formatter.Formatter{}) log.Infoln("test messages") } ``` For advanced usage, please refer to [example](examples)