hit9 / log

Package log implements leveled logging.

Home Page:https://pkg.go.dev/github.com/hit9/log

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Log

Package log implements leveled logging.

https://pkg.go.dev/github.com/hit9/log

Example

package main

import (
	"github.com/hit9/log"
)

var logger = log.Get("Name")

func main() {
	logger.SetLevel(log.INFO)
	logger.Debug("This is a debug message")
	logger.Info("This is a info message")
	logger.Warn("This is a warning message")
	logger.Error("This is an error message")
	logger.Warn("This is a number %v", 1)
}

License

BSD.

About

Package log implements leveled logging.

https://pkg.go.dev/github.com/hit9/log

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:Go 100.0%