Skip to content

guygrigsby/coloredgoroutine

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Colored Goroutines

import "github.com/xiegeo/coloredgoroutine"

Just replace

var logger = log.New(os.Stdout, "logger: ", log.Lshortfile)

with

var logger = log.New(coloredgoroutine.Colors(os.Stdout), "logger: ", log.Lshortfile)

So you can easily remove it when you are done debugging and no one will know.

Sample output:

screenshot

Color template:

screenshot

Bigger numbered go routines will repeat the colors.

About

Color-coded debug logging by go routine id.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%