Categorygithub.com/r4wizard/logmatic
modulepackage
0.4.2
Repository: https://github.com/r4wizard/logmatic.git
Documentation: pkg.go.dev

# README

GoDoc Build Status Go Report Card codecov

logmatic

Colorized logger for Golang with dynamic log level configuration

Documentation here: https://godoc.org/github.com/borderstech/logmatic

Example Usage

l := logmatic.NewLogger()
l.SetLevel(logmatic.DEBUG)

l.Trace("This will not display")
l.Debug("Something happened")
l.Info("Here is some information")
l.Warn("Do not do that")
l.Error("Something bad happened...")

l.SetLevel(logmatic.TRACE)
l.Trace("Now this will display")

l.Fatal("The application will now exit")

Example results

# Functions

NewLogger creates a new logger Default level is INFO.

# Constants

Log levels.
Log levels.
Log levels.
Log levels.
Log levels.
Log levels.

# Structs

Logger maintains a set of logging functions and has a log level that can be modified dynamically.

# Type aliases

LogLevel controls what log statements are activated for a given logger.