logrusiowriter alternatives and similar packages
Based on the "Logging" category.
Alternatively, view logrusiowriter alternatives based on common mentions on social networks and blogs.
-
spew
Implements a deep pretty printer for Go data structures to aid in debugging -
seelog
Seelog is a native Go logging library that provides flexible asynchronous dispatching, filtering, and formatting. -
logxi
A 12-factor app logger built for performance and happy development -
go-logger
Simple logger for Go programs. Allows custom formats for messages. -
rollingwriter
Rolling writer is an IO util for auto rolling write in go. -
httpretty
Package httpretty prints the HTTP requests you make with Go pretty on your terminal. -
sqldb-logger
A logger for Go SQL database driver without modifying existing *sql.DB stdlib usage. -
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. -
logex
An golang log lib, supports tracking and level, wrap by standard log lib -
gologger
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. -
mlog
A simple logging module for go, with a rotating file feature and console logging. -
journald
Go implementation of systemd Journal's native API for logging -
slf
The Structured Logging Facade (SLF) for Go (like SLF4J but structured and for Go) -
Kiwi Logs&Context
Fast, structured, with filters and dynamic sinks. No levels. Logger & context keeper for Go language 🥝 It smell like a mushroom. -
logmatic
Colorized logger for Golang with dynamic log level configuration -
slog
The reference implementation of the Structured Logging Facade (SLF) for Go -
gomol
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 -
go-rethinklogger
Automatically persists all the logs of your Go application inside RethinkDB. -
MrZ's go-logger
:mag: Easy to use, extendable and super fast logging package for Go
Static code analysis for 29 languages.
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.