LogGdb is a go package that uses charmbracelet “Log” to quickly add a logger in your project. Its also supports debugging code incase of a Fatal error.
To use LogGdb
go get github.com/m1ndo/LogGdb
import loggdb "github.com/m1ndo/LogGdb"
type App struct {
Logger *loggdb.Logger
}
func NewApp() *App {
a := &App{Logger: &loggdb.Logger{}}
if err := Logger.NewLogger(); err!= nil {
panic(err)
}
a.Logger.Log.Info("Hello World")
// To Disable The GDB backTrace .
a.Logger.Gdb.Disable(true)
// Rest of the App / Project
return a
}
Further examples check folder examples/
GPLv3