Skip to content

Simple debug logger with colorful namespaces and log time

Notifications You must be signed in to change notification settings

SlavaBatig/godebug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

godebug

Simple debug logger with colorful namespaces and log time.

The color of namespace is calculated from it's hex representation.

Motivation

Inspired by debug.

Install

go get github.com/SlavaBatig/godebug

or

dep ensure --add github.com/SlavaBatig/godebug

Example

Code

package main

import debug "github.com/SlavaBatig/godebug"

func main() {
	debug, err := debug.Debug("test:namespace")

	debug("Printed to stdout")

	err("Printed to stderr")
}

Result printed to terminal

About

Simple debug logger with colorful namespaces and log time

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages