logutils alternatives and similar packages
Based on the "Logging" category.
Alternatively, view logutils 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 logutils or a related project?
Popular Comparisons
README
logutils
logutils is a Go package that augments the standard library "log" package to make logging a bit more modern, without fragmenting the Go ecosystem with new logging packages.
The simplest thing that could possibly work
Presumably your application already uses the default log
package. To switch, you'll want your code to look like the following:
package main
import (
"log"
"os"
"github.com/hashicorp/logutils"
)
func main() {
filter := &logutils.LevelFilter{
Levels: []logutils.LogLevel{"DEBUG", "WARN", "ERROR"},
MinLevel: logutils.LogLevel("WARN"),
Writer: os.Stderr,
}
log.SetOutput(filter)
log.Print("[DEBUG] Debugging") // this will not print
log.Print("[WARN] Warning") // this will
log.Print("[ERROR] Erring") // and so will this
log.Print("Message I haven't updated") // and so will this
}
This logs to standard error exactly like go's standard logger. Any log messages you haven't converted to have a level will continue to print as before.