https://github.com/xwi88/log4go
simple and powerful log for go, now support output to console, file and kafka
https://github.com/xwi88/log4go
console go go-log kafka log log4go logger writer
Last synced: 3 months ago
JSON representation
simple and powerful log for go, now support output to console, file and kafka
- Host: GitHub
- URL: https://github.com/xwi88/log4go
- Owner: xwi88
- License: gpl-3.0
- Created: 2018-12-23T09:20:17.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2021-12-18T00:43:27.000Z (over 3 years ago)
- Last Synced: 2025-01-15T17:36:56.618Z (4 months ago)
- Topics: console, go, go-log, kafka, log, log4go, logger, writer
- Language: Go
- Homepage:
- Size: 48.8 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# log4go
The simple but powerful log for go.
## TODO
- [x] base logger
- [x] console writer
- [x] file writer
- [x] kafka writer
- [ ] net writer## ENV
The go version shall >= `1.16`
## Writers
- support output the caller`s file and lines
- support level filter
- simply use, pls ref `xxx_test.go`### FileWriter
>Filename regex support: `%Y` `%M` `%D` `%H` `%m`, prefix must be `%`
### KafkaWriter
>Can writer to kafka easily, with `es_index` you can also transfer data to ES easily. If you want more fields can set
> them by the field `msg.extra_fields`.## Thanks
- [OpenSourceSupport](https://jb.gg/OpenSourceSupport)
