A Go(Golang) package to do structured logging.
go get -v -u github.com/hueristiq/hqgolog
package main
import (
"github.com/hueristiq/hqgolog"
"github.com/hueristiq/hqgolog/formatter"
"github.com/hueristiq/hqgolog/levels"
)
func main() {
hqgolog.DefaultLogger.SetMaxLevel(levels.LevelDebug)
hqgolog.DefaultLogger.SetFormatter(formatter.NewCLI(&formatter.CLIOptions{
Colorize: true,
}))
hqgolog.Print().Msg("Print message")
hqgolog.Info().Msg("Info message")
hqgolog.Warn().Msg("Warn message")
hqgolog.Error().Msg("Error message")
hqgolog.Fatal().Msg("Fatal message")
}
Issues and Pull Requests are welcome! Check out the contribution guidelines.
This package is distributed under the MIT license.