Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows color #20

Open
ghost opened this issue Jun 14, 2019 · 1 comment
Open

Windows color #20

ghost opened this issue Jun 14, 2019 · 1 comment

Comments

@ghost
Copy link

ghost commented Jun 14, 2019

Using this file:

package main
import "github.com/apsdehal/go-logger"
func main () {
   aa, _ := logger.New(1, 1)
   aa.Warning("bbbbb")
}

I get this result:

[33m#1 2019-06-14 06:39:31 log.go:8 ▶ WAR bbbbb [0m
@ghost
Copy link
Author

ghost commented Jun 23, 2019

Workaround:

package main
import (
   "github.com/apsdehal/go-logger"
   "github.com/mattn/go-colorable"
)
func main () {
   aa, _ := logger.New(1, colorable.NewColorableStdout())
   aa.Warning("bb")
}

Or:

package main
import "github.com/labstack/gommon/log"
func main() {
   log.EnableColor()
   log.Warn("bb")
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants