https://github.com/iamdanielyin/logrusfmt
Logs time and message on the same line.
https://github.com/iamdanielyin/logrusfmt
formatters logrus
Last synced: over 1 year ago
JSON representation
Logs time and message on the same line.
- Host: GitHub
- URL: https://github.com/iamdanielyin/logrusfmt
- Owner: iamdanielyin
- License: apache-2.0
- Created: 2018-06-13T16:31:04.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-13T16:50:32.000Z (about 8 years ago)
- Last Synced: 2025-01-23T16:14:06.077Z (over 1 year ago)
- Topics: formatters, logrus
- Language: Go
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# logrusfmt
Logs time and message on the same line.
Example:
```go
package main
import (
log "github.com/sirupsen/logrus"
fmt "github.com/yinfxs/logrusfmt"
)
func main() {
log.SetFormatter(&fmt.SimpleTextFormatter{})
log.WithFields(log.Fields{
"animal": "walrus",
}).Info("A walrus appears")
}
```