bump logrus v1.4.2
full diff: https://github.com/sirupsen/logrus/compare/v1.4.1...v1.4.2 - sirupsen/logrus#946 Fix solaris build - sirupsen/logrus#966 Add a checkTerminal for nacl to support running on play.golang.org - sirupsen/logrus#969 fix build break for plan9 Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
6a26d370ad
commit
9b92804656
@ -69,7 +69,7 @@ github.com/prometheus/common 7600349dcfe1abd18d72d3a17708
|
|||||||
github.com/prometheus/procfs 7d6f385de8bea29190f15ba9931442a0eaef9af7
|
github.com/prometheus/procfs 7d6f385de8bea29190f15ba9931442a0eaef9af7
|
||||||
github.com/russross/blackfriday 1d6b8e9301e720b08a8938b8c25c018285885438
|
github.com/russross/blackfriday 1d6b8e9301e720b08a8938b8c25c018285885438
|
||||||
github.com/shurcooL/sanitized_anchor_name 10ef21a441db47d8b13ebcc5fd2310f636973c77
|
github.com/shurcooL/sanitized_anchor_name 10ef21a441db47d8b13ebcc5fd2310f636973c77
|
||||||
github.com/sirupsen/logrus 8bdbc7bcc01dcbb8ec23dc8a28e332258d25251f # v1.4.1
|
github.com/sirupsen/logrus 839c75faf7f98a33d445d181f3018b5c3409a45e # v1.4.2
|
||||||
github.com/spf13/cobra ef82de70bb3f60c65fb8eebacbb2d122ef517385 # v0.0.3
|
github.com/spf13/cobra ef82de70bb3f60c65fb8eebacbb2d122ef517385 # v0.0.3
|
||||||
github.com/spf13/pflag 4cb166e4f25ac4e8016a3595bbf7ea2e9aa85a2c https://github.com/thaJeztah/pflag.git # temporary fork with https://github.com/spf13/pflag/pull/170 applied, which isn't merged yet upstream
|
github.com/spf13/pflag 4cb166e4f25ac4e8016a3595bbf7ea2e9aa85a2c https://github.com/thaJeztah/pflag.git # temporary fork with https://github.com/spf13/pflag/pull/170 applied, which isn't merged yet upstream
|
||||||
github.com/syndtr/gocapability d98352740cb2c55f81556b63d4a1ec64c5a319c2
|
github.com/syndtr/gocapability d98352740cb2c55f81556b63d4a1ec64c5a319c2
|
||||||
|
2
vendor/github.com/sirupsen/logrus/go.mod
generated
vendored
2
vendor/github.com/sirupsen/logrus/go.mod
generated
vendored
@ -6,5 +6,5 @@ require (
|
|||||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||||
github.com/stretchr/objx v0.1.1 // indirect
|
github.com/stretchr/objx v0.1.1 // indirect
|
||||||
github.com/stretchr/testify v1.2.2
|
github.com/stretchr/testify v1.2.2
|
||||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33
|
golang.org/x/sys v0.0.0-20190422165155-953cdadca894
|
||||||
)
|
)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// +build js
|
// +build js nacl plan9
|
||||||
|
|
||||||
package logrus
|
package logrus
|
||||||
|
|
2
vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go
generated
vendored
2
vendor/github.com/sirupsen/logrus/terminal_check_notappengine.go
generated
vendored
@ -1,4 +1,4 @@
|
|||||||
// +build !appengine,!js,!windows
|
// +build !appengine,!js,!windows,!nacl,!plan9
|
||||||
|
|
||||||
package logrus
|
package logrus
|
||||||
|
|
||||||
|
11
vendor/github.com/sirupsen/logrus/terminal_check_solaris.go
generated
vendored
Normal file
11
vendor/github.com/sirupsen/logrus/terminal_check_solaris.go
generated
vendored
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
package logrus
|
||||||
|
|
||||||
|
import (
|
||||||
|
"golang.org/x/sys/unix"
|
||||||
|
)
|
||||||
|
|
||||||
|
// IsTerminal returns true if the given file descriptor is a terminal.
|
||||||
|
func isTerminal(fd int) bool {
|
||||||
|
_, err := unix.IoctlGetTermio(fd, unix.TCGETA)
|
||||||
|
return err == nil
|
||||||
|
}
|
18
vendor/github.com/sirupsen/logrus/terminal_check_windows.go
generated
vendored
18
vendor/github.com/sirupsen/logrus/terminal_check_windows.go
generated
vendored
@ -6,15 +6,29 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
|
sequences "github.com/konsorten/go-windows-terminal-sequences"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func initTerminal(w io.Writer) {
|
||||||
|
switch v := w.(type) {
|
||||||
|
case *os.File:
|
||||||
|
sequences.EnableVirtualTerminalProcessing(syscall.Handle(v.Fd()), true)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func checkIfTerminal(w io.Writer) bool {
|
func checkIfTerminal(w io.Writer) bool {
|
||||||
|
var ret bool
|
||||||
switch v := w.(type) {
|
switch v := w.(type) {
|
||||||
case *os.File:
|
case *os.File:
|
||||||
var mode uint32
|
var mode uint32
|
||||||
err := syscall.GetConsoleMode(syscall.Handle(v.Fd()), &mode)
|
err := syscall.GetConsoleMode(syscall.Handle(v.Fd()), &mode)
|
||||||
return err == nil
|
ret = (err == nil)
|
||||||
default:
|
default:
|
||||||
return false
|
ret = false
|
||||||
}
|
}
|
||||||
|
if ret {
|
||||||
|
initTerminal(w)
|
||||||
|
}
|
||||||
|
return ret
|
||||||
}
|
}
|
||||||
|
8
vendor/github.com/sirupsen/logrus/terminal_notwindows.go
generated
vendored
8
vendor/github.com/sirupsen/logrus/terminal_notwindows.go
generated
vendored
@ -1,8 +0,0 @@
|
|||||||
// +build !windows
|
|
||||||
|
|
||||||
package logrus
|
|
||||||
|
|
||||||
import "io"
|
|
||||||
|
|
||||||
func initTerminal(w io.Writer) {
|
|
||||||
}
|
|
18
vendor/github.com/sirupsen/logrus/terminal_windows.go
generated
vendored
18
vendor/github.com/sirupsen/logrus/terminal_windows.go
generated
vendored
@ -1,18 +0,0 @@
|
|||||||
// +build !appengine,!js,windows
|
|
||||||
|
|
||||||
package logrus
|
|
||||||
|
|
||||||
import (
|
|
||||||
"io"
|
|
||||||
"os"
|
|
||||||
"syscall"
|
|
||||||
|
|
||||||
sequences "github.com/konsorten/go-windows-terminal-sequences"
|
|
||||||
)
|
|
||||||
|
|
||||||
func initTerminal(w io.Writer) {
|
|
||||||
switch v := w.(type) {
|
|
||||||
case *os.File:
|
|
||||||
sequences.EnableVirtualTerminalProcessing(syscall.Handle(v.Fd()), true)
|
|
||||||
}
|
|
||||||
}
|
|
4
vendor/github.com/sirupsen/logrus/text_formatter.go
generated
vendored
4
vendor/github.com/sirupsen/logrus/text_formatter.go
generated
vendored
@ -84,10 +84,6 @@ type TextFormatter struct {
|
|||||||
func (f *TextFormatter) init(entry *Entry) {
|
func (f *TextFormatter) init(entry *Entry) {
|
||||||
if entry.Logger != nil {
|
if entry.Logger != nil {
|
||||||
f.isTerminal = checkIfTerminal(entry.Logger.Out)
|
f.isTerminal = checkIfTerminal(entry.Logger.Out)
|
||||||
|
|
||||||
if f.isTerminal {
|
|
||||||
initTerminal(entry.Logger.Out)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user