https://github.com/abbychau/filebeatudpwriter
https://github.com/abbychau/filebeatudpwriter
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/abbychau/filebeatudpwriter
- Owner: abbychau
- License: mit
- Created: 2023-07-06T05:13:02.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-06T09:16:07.000Z (almost 2 years ago)
- Last Synced: 2025-02-14T03:14:56.124Z (4 months ago)
- Language: Go
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FileBeat UDP Writer for ZeroLog AND Gin
[](https://pkg.go.dev/github.com/abbychau/filebeatUdpWriter)
FileBeat UDP Logger for ZeroLog and Gin.
# Usage
```go
r := gin.New()udpLogger, _ := filebeatUdpWriter.CreateLogger("localhost:8125") //you can catch the error here
r.Use(filebeatUdpWriter.GinHandle("gin", udpLogger))
r.Use(filebeatUdpWriter.GinHandle("gin", log.Logger))
```# Why this Logger?
1. Compatible with ZeroLog and Gin so that you can log in JSON format for Gin requests.
2. UDP is fast, non-blocking and does not require a file handler.
3. No more docker volume mounting.# Package Link
https://pkg.go.dev/github.com/abbychau/filebeatUdpWriter