Skip to content

Commit

Permalink
Fix console color output
Browse files Browse the repository at this point in the history
  • Loading branch information
ellaismer committed Dec 30, 2017
1 parent 913aefb commit 81d9d56
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion console/console.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
"github.com/ellaism/go-ellaism/rpc"
"github.com/peterh/liner"
"github.com/robertkrimen/otto"
"github.com/fatih/color"
)

var (
Expand Down Expand Up @@ -80,7 +81,7 @@ func New(config Config) (*Console, error) {
config.Prompt = DefaultPrompt
}
if config.Printer == nil {
config.Printer = os.Stdout
config.Printer = color.Output
}
// Initialize the console and return
console := &Console{
Expand Down
4 changes: 2 additions & 2 deletions logger/glog/glog.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ import (
"sync/atomic"
"time"

"github.com/mattn/go-colorable"
"github.com/fatih/color"
)

// DefaultVerbosity establishes the default verbosity Level for
Expand Down Expand Up @@ -149,7 +149,7 @@ var severityName = []string{
fatalLog: "FATAL",
}

var displayStderr = colorable.NewColorableStderr()
var displayStderr = color.StderrOutput

// these path prefixes are trimmed for display, but not when
// matching vmodule filters.
Expand Down
2 changes: 2 additions & 0 deletions vendor/github.com/fatih/color/color.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 81d9d56

Please sign in to comment.