24 lines
394 B
Markdown
24 lines
394 B
Markdown
## Sample Usage
|
|
Sample usage using available option to format output
|
|
|
|
```go
|
|
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:
|
|
```bash
|
|
[INFO] [2023-04-08 19:16:55.000] Log message
|
|
```
|
|
|