Log
See the log concepts for details.
How to bootstrap letslog?
.env
. Debug is default.
Define a severity level in LOG_LEVEL=debug
InitLogFuncs()
in main.go
Call package main
import (
...
"github.com/letsgo-framework/letsgo/letslog"
...
)
func main() {
...
...
letslog.InitLogFuncs()
...
}
Write log
greet := "Hello log"
letslog.Debug("%s from letsgo", greet)
./log/letsgo.log
or run
View log: you can manually open letsgo-cli log 50