logrusiowriter alternatives and similar packages
Based on the "Logging" category.
Alternatively, view logrusiowriter alternatives based on common mentions on social networks and blogs.
-
seelog
Seelog is a native Go logging library that provides flexible asynchronous dispatching, filtering, and formatting. -
loggo
A logging library for Go. Doesn't use the built in go log standard library, but instead offers a replacement. -
ozzo-log
A Go (golang) package providing high-performance asynchronous logging, message filtering by severity and category, and multiple message targets. -
gologger
DISCONTINUED. Simple easy to use log lib for go, logs in Colored Cosole, Simple Console, File or Elasticsearch. -
noodlog
๐ Parametrized JSON logging library in Golang which lets you obfuscate sensitive data and marshal any kind of content. -
Kiwi Logs&Context
Fast, structured, with filters and dynamic sinks. No levels. Logger & context keeper for Go language ๐ฅ It smells like a mushroom. -
gomol
DISCONTINUED. Gomol is a library for structured, multiple-output logging for Go with extensible logging outputs -
kemba
A tiny debug logging tool. Ideal for CLI tools and command applications. Inspired by https://github.com/visionmedia/debug
CodeRabbit: AI Code Reviews for Developers
Do you think we are missing an alternative of logrusiowriter or a related project?
Popular Comparisons
README
logrusiowriter
io.Writer
implementation using logrus
Motivation
Many golang libraries use the golang's log
package to print their logs. This means that if your application
uses logrus to print structured logging, those packages will print a format that is (probably) incompatible with yours,
and you may end losing logs in your logs collector because they can't be parsed properly.
Solution
Print the logs written using log.Printf
through logrus
, by setting log.SetOutput
to an io.Writer
implementation
that uses logrus
as output, i.e.:
log.SetOutput(logrusiowriter.New())
See example_*_test.go
files to find testable examples that serve as documentation.
Simple solution
Or... you can simply use the standard APIs that logrus provides, i.e., this does the same as this package:
log.SetOutput(logrus.WithFields(logrus.Fields{"logger": "stdlib"}).WriterLevel(logrus.InfoLevel))
So, unless you want this to be configurable using an envconfig-filled struct, there's no reason to use this library.