Debian Codegraph @

/

debian golang-github-twin-logr 0.3.1-4debian golang-github-twin-logr-dev gomod github.com/TwiN/logr debiangomakefilemarkdownshellyaml 16 files · 172 symbols
View dependency graph

Depends on

README (full)

logr

Go logging library with levels.

Usage

go get -u github.com/TwiN/logr
import "github.com/TwiN/logr"

func main() {
    logr.Debug("This is a debug message")
    logr.Infof("This is an %s message", "info")
    logr.Warn("This is a warn message")
    logr.Error("This is an error message")
    logr.Fatal("This is a fatal message") // Exits with code 1
}

You can set the default logger's threshold like so:

logr.SetThreshold(logr.LevelWarn)

The above would make it so only WARN, ERROR and FATAL messages are logged, while DEBUG and INFO messages are ignored.

TODO: Finish documentation

dir .github/
dir debian/
file .gitattributes
file .gitignore
file LICENSE
file README.md
file go.mod
file levels.go
file levels_test.go
file logr.go
file logr_test.go