Simplistic, opinionated logging for Golang
MIT License
Simplistic, opinionated logging for Golang
LOGGER=trace|debug|info|warn|error
[trace] 20:04:57.670116 logger.go:125: trace shows granular timestamp and line info
[debug] 20:04:57 logger.go:129: debug shows regular timestamp and line info
[info] 2019/05/08 20:04:57 info shows timestamp
[warn] 2019/05/08 20:04:57 warn shows timestamp
[error] 2019/05/08 20:04:57 logger.go:141: error shows timestamp and line info
go get github.com/schollz/logger
package main
import (
log "github.com/schollz/logger"
)
func main() {
log.SetLevel("debug")
log.Debug("hello, world")
}
Pull requests are welcome. Feel free to...
MIT