
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
github.com/fenderdigital/logrus-redis-hook
Useful for centralized logging, using a RELK stack (Redis, Elasticsearch, Logstash and Kibana). When the hook is installed, all log messages are sent to a Redis server, in Logstash message V0 or V1 format, ready to be parsed/processed by Logstash.
$ go get github.com/rogierlommers/logrus-redis-hook
package main
import (
log "github.com/sirupsen/logrus"
"github.com/rogierlommers/logrus-redis-hook"
)
func init() {
hook, err := logredis.NewHook("localhost", 6379, "my_redis_key", "my_app_name")
if err == nil {
log.AddHook(hook)
}
}
func main() {
// when hook is injected succesfully, logs will be send to redis server
log.Info("just some logging...")
}
type LogstashMessageV0 struct {
Type string `json:"@type,omitempty"`
Timestamp string `json:"@timestamp"`
Sourcehost string `json:"@source_host"`
Message string `json:"@message"`
Fields struct {
Application string `json:"application"`
File string `json:"file"`
Level string `json:"level"`
} `json:"@fields"`
}
type LogstashMessageV1 struct {
Type string `json:"@type,omitempty"`
Timestamp string `json:"@timestamp"`
Sourcehost string `json:"host"`
Message string `json:"message"`
Application string `json:"application"`
File string `json:"file"`
Level string `json:"level"`
}
Please see the docker-compose
directory for information about how to test. There is a readme inside.
MIT
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.