Tree @master (Download .tar.gz)
gologger
gologger is a very simple logging package to do structured logging in go.
Use gologger as a library
package main
import (
"strconv"
"github.com/projectdiscovery/gologger"
"github.com/projectdiscovery/gologger/levels"
)
func main() {
gologger.DefaultLogger.SetMaxLevel(levels.LevelDebug)
// gologger.DefaultLogger.SetFormatter(&formatter.JSON{})
gologger.Print().Msgf("\tgologger: sample test\t\n")
gologger.Info().Str("user", "pdteam").Msg("running simulation program")
for i := 0; i < 10; i++ {
gologger.Info().Str("count", strconv.Itoa(i)).Msg("running simulation step...")
}
gologger.Debug().Str("state", "running").Msg("planner running")
gologger.Warning().Str("state", "errored").Str("status", "404").Msg("could not run")
gologger.Fatal().Msg("bye bye")
}
gologger is made with 🖤 by the projectdiscovery team.
Commit History @master
- Refresh Debian files Steev Klimaszewski 1 year, 4 months ago
- New upstream version 1.1.4 Steev Klimaszewski 1 year, 4 months ago
- deps bump Mzack9999 (commit: Steev Klimaszewski) 1 year, 4 months ago
- fixing typo Mzack9999 (commit: Steev Klimaszewski) 1 year, 4 months ago
- Update LICENSE.md PD-Team (commit: Steev Klimaszewski) 1 year, 4 months ago
- Added print and silent functions Ice3man543 (commit: Steev Klimaszewski) 1 year, 4 months ago
- Added missing os.Exit for fatalf thanks to dw1 Ice3man543 (commit: Steev Klimaszewski) 1 year, 4 months ago
- Fixed coloring example for aurora Ice3man543 (commit: Steev Klimaszewski) 1 year, 4 months ago
- misc changes team-projectdiscovery (commit: Steev Klimaszewski) 1 year, 4 months ago
- Bug fixes and misc work on logging Ice3man543 (commit: Steev Klimaszewski) 1 year, 4 months ago