Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'upstream/fix/vendor_folder'
Browse files Browse the repository at this point in the history
  • Loading branch information
tzdybal committed May 1, 2018
2 parents 6c16fad + d0ec4d1 commit b18a737
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 70 deletions.
9 changes: 5 additions & 4 deletions Gopkg.lock

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

6 changes: 4 additions & 2 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -118,5 +118,7 @@
name = "github.com/ethereumproject/benchmark"

[[constraint]]
branch = "master"
name = "github.com/fatih/color"
name = "github.com/fatih/color"
# TODO(tzdybal): monitor https://github.com/fatih/color/pull/87
source = "github.com/achilleas-k/color"
branch = "expose-colorised-stderr"
12 changes: 6 additions & 6 deletions logger/glog/glog.go
Original file line number Diff line number Diff line change
Expand Up @@ -966,14 +966,14 @@ func (l *loggingT) output(s severity, buf *buffer, file string, line int, alsoTo
}
data := buf.Bytes()
if l.toStderr {
color.StderrOutput.Write(data)
color.Error.Write(data)
} else {
if alsoToStderr || l.alsoToStderr || s >= l.stderrThreshold.get() {
color.StderrOutput.Write(data)
color.Error.Write(data)
}
if l.file[s] == nil {
if err := l.createFiles(s); err != nil {
color.StderrOutput.Write(data) // Make sure the message appears somewhere.
color.Error.Write(data) // Make sure the message appears somewhere.
l.exit(err)
}
}
Expand Down Expand Up @@ -1003,7 +1003,7 @@ func (l *loggingT) output(s severity, buf *buffer, file string, line int, alsoTo
// If -logtostderr has been specified, the loop below will do that anyway
// as the first stack in the full dump.
if !l.toStderr {
color.StderrOutput.Write(stacks(false))
color.Error.Write(stacks(false))
}
// Write the stack trace for all goroutines to the files.
trace := stacks(true)
Expand Down Expand Up @@ -1038,7 +1038,7 @@ func timeoutFlush(timeout time.Duration) {
select {
case <-done:
case <-time.After(timeout):
fmt.Fprintln(color.StderrOutput, "glog: Flush took longer than", timeout)
fmt.Fprintln(color.Error, "glog: Flush took longer than", timeout)
}
}

Expand Down Expand Up @@ -1071,7 +1071,7 @@ var logExitFunc func(error)
// It flushes the logs and exits the program; there's no point in hanging around.
// l.mu is held.
func (l *loggingT) exit(err error) {
fmt.Fprintf(color.StderrOutput, "log: exiting because of error: %s\n", err)
fmt.Fprintf(color.Error, "log: exiting because of error: %s\n", err)
// If logExitFunc is set, we do that instead of exiting.
if logExitFunc != nil {
logExitFunc(err)
Expand Down
27 changes: 0 additions & 27 deletions vendor/github.com/fatih/color/Gopkg.lock

This file was deleted.

30 changes: 0 additions & 30 deletions vendor/github.com/fatih/color/Gopkg.toml

This file was deleted.

4 changes: 3 additions & 1 deletion 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 b18a737

Please sign in to comment.