Skip to content

A Go(Golang) package package for structured logging.

License

Notifications You must be signed in to change notification settings

hueristiq/hq-go-logger

Repository files navigation

hq-go-logger

made with go go report card open issues closed issues license maintenance contribution

hq-go-logger is a Go(Golang) package for structured logging.

Resources

Usage

go get -v -u go.source.hueristiq.com/logger

Below are examples demonstrating how to use the different features of the hq-go-logger package.

package main

import (
	"go.source.hueristiq.com/logger"
	"go.source.hueristiq.com/logger/formatter"
	"go.source.hueristiq.com/logger/levels"
)

func main() {
	logger.DefaultLogger.SetMaxLevel(levels.LevelDebug)
	logger.DefaultLogger.SetFormatter(formatter.NewCLI(&formatter.CLIOptions{
		Colorize: true,
	}))


	logger.Print().Msg("Print message")
	logger.Info().Msg("Info message")
	logger.Warn().Msg("Warn message")
	logger.Error().Msg("Error message")
	logger.Fatal().Msg("Fatal message")
}

Contributing

Feel free to submit Pull Requests or report Issues. For more details, check out the contribution guidelines.

Huge thanks to the contributors thus far!

contributors

Licensing

This package is licensed under the MIT license. You are free to use, modify, and distribute it, as long as you follow the terms of the license. You can find the full license text in the repository - Full MIT license text.

About

A Go(Golang) package package for structured logging.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published