Skip to content

Simple and extensible colorizer for lorg, Go-lang logger

License

Notifications You must be signed in to change notification settings

reconquest/colorgful

Repository files navigation

colorgful report

Colorizer extension for lorg.

Basically, turns lorg output into this:

dark

Or this:

light

colorgful comes with two embedded themes: light and dark.

Example

package main

import (
	"github.com/kovetskiy/lorg"
	"github.com/reconquest/colorgful"
)

func main() {
	log := lorg.NewLog()

	log.SetFormat(colorgful.MustApplyDefaultTheme(
		`* ${time} ${level} %s`,
		colorgful.Light,
	))

	log.SetLevel(lorg.LevelTrace)

	log.Trace("tracing dead status")

	log.Debug("debuggin dead status")

	log.Info("soon you will be dead")

	log.Warning("you are not prepared to be dead")

	log.Error("you're dead!")

	log.Fatal("stopping")
}

About

Simple and extensible colorizer for lorg, Go-lang logger

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages