An open API service indexing awesome lists of open source software.

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

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)

![JetBrains Logo (Main) logo](https://resources.jetbrains.com/storage/products/company/brand/logos/jb_beam.svg)