go-logger
go-logger copied to clipboard
Simple logger for Go programs. Allows custom formats for messages.
Using this file: ~~~go package main import "github.com/apsdehal/go-logger" func main () { aa, _ := logger.New(1, 1) aa.Warning("bbbbb") } ~~~ I get this result: ~~~ [33m#1 2019-06-14 06:39:31 log.go:8 ▶...
For example, there could be multiple subsystems in a project, and it would nice to be able to selectively enable or disable logs with a certain tag.
``` // Use log levels to set your log priority log2.SetLogLevel(DebugLevel) ``` Since this code is not in the logger package, it doesn't have access to `DebugLevel`. Use this instead:...