rogierlommers / logrus-redis-hook Goto Github PK
View Code? Open in Web Editor NEWHook for Logrus which enables logging to RELK stack (Redis, Elasticsearch, Logstash and Kibana)
License: MIT License
Hook for Logrus which enables logging to RELK stack (Redis, Elasticsearch, Logstash and Kibana)
License: MIT License
Currently only V0 is supported, which should be default. By passing param to hook, it should support V1 as well.
When the hook is successfully in use, do NOT log to stdout/err.
It looks like warnings are not being sent to redis.
Nice one @rogierlommers !
We will share this hook (and logrus because we did not know it) in our next RedisWeekly tomorrow!
Hello, I'm just opening this issue to let you know, the next release of logrus (v1.2.0) will add a new trace level named Trace below Debug.
Here is the PR for reference sirupsen/logrus#844
You may want to take into account this new level.
Is there a way to send additional fields to redis. Ultimately would like the ELK stack to pick up additional fields. The current out of box works, but don't seem to see the With Fields added.
log.WithFields(log.Fields{ "animal": "walrus", }).Info("A walrus appears")
Hi there,
I just started using logrus hooks and thought about a redis hook, and obviously someone thought about that first :)
I have been using redis publish / subscribe (and later redis streams), I think both would work well.
I might make a PR to implement this. Thanks !
return &RedisHook{ RedisHost: config.Host, RedisPool: pool, RedisKey: config.Key, LogstashFormat: config.Format, AppName: config.App, Hostname: config.Host, //should be config.HostName TTL: config.TTL, }, nil
Previously used logrus_logstash hook. Tried to switch to logredis hook.
panic(0x95c720, 0xc08200a070)
D:/Go/src/runtime/panic.go:481 +0x3f4
github.com/Sirupsen/logrus.(*Entry).Debug(0x0, 0xc082199f30, 0x1, 0x1)
d:/data/goprojects/src/github.com/Sirupsen/logrus/entry.go:118 +0x23
Hello,
Could you provide a license file, please?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.