Skip to content
Simple and extensible colorizer for lorg, Go-lang logger
Go
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README.md
colorgful.go
colorgful_test.go
dark.png
formatter.go
inserter.go
light.png
restorer.go
themes.go

README.md

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")
}
You can’t perform that action at this time.