vendor: sirupsen/logrus v1.6.0
full diff: https://github.com/sirupsen/logrus/compare/v1.5.0...v1.6.0 - Add flag to disable quotes in TextFormatter - Revert "fix race conditions on entry" - fixes Deadlock during Entry.Infof after upgrade to v1.5.0 - fixes Deadlock when using WithField inside of hook - fixes Overly-aggressive mutex locks Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
c668d7660d
commit
ec12d3042f
@ -39,7 +39,7 @@ github.com/prometheus/client_model d1d2010b5beead3fa1c5f271a5cf
|
|||||||
github.com/prometheus/common 287d3e634a1e550c9e463dd7e5a75a422c614505 # v0.7.0
|
github.com/prometheus/common 287d3e634a1e550c9e463dd7e5a75a422c614505 # v0.7.0
|
||||||
github.com/prometheus/procfs 6d489fc7f1d9cd890a250f3ea3431b1744b9623f # v0.0.8
|
github.com/prometheus/procfs 6d489fc7f1d9cd890a250f3ea3431b1744b9623f # v0.0.8
|
||||||
github.com/russross/blackfriday 05f3235734ad95d0016f6a23902f06461fcf567a # v1.5.2
|
github.com/russross/blackfriday 05f3235734ad95d0016f6a23902f06461fcf567a # v1.5.2
|
||||||
github.com/sirupsen/logrus d417be0fe654de640a82370515129985b407c7e3 # v1.5.0
|
github.com/sirupsen/logrus 60c74ad9be0d874af0ab0daef6ab07c5c5911f0d # v1.6.0
|
||||||
github.com/syndtr/gocapability d98352740cb2c55f81556b63d4a1ec64c5a319c2
|
github.com/syndtr/gocapability d98352740cb2c55f81556b63d4a1ec64c5a319c2
|
||||||
github.com/urfave/cli bfe2e925cfb6d44b40ad3a779165ea7e8aff9212 # v1.22.0
|
github.com/urfave/cli bfe2e925cfb6d44b40ad3a779165ea7e8aff9212 # v1.22.0
|
||||||
go.etcd.io/bbolt a0458a2b35708eef59eb5f620ceb3cd1c01a824d # v1.3.3
|
go.etcd.io/bbolt a0458a2b35708eef59eb5f620ceb3cd1c01a824d # v1.3.3
|
||||||
|
2
vendor/github.com/sirupsen/logrus/entry.go
generated
vendored
2
vendor/github.com/sirupsen/logrus/entry.go
generated
vendored
@ -122,8 +122,6 @@ func (entry *Entry) WithField(key string, value interface{}) *Entry {
|
|||||||
|
|
||||||
// Add a map of fields to the Entry.
|
// Add a map of fields to the Entry.
|
||||||
func (entry *Entry) WithFields(fields Fields) *Entry {
|
func (entry *Entry) WithFields(fields Fields) *Entry {
|
||||||
entry.Logger.mu.Lock()
|
|
||||||
defer entry.Logger.mu.Unlock()
|
|
||||||
data := make(Fields, len(entry.Data)+len(fields))
|
data := make(Fields, len(entry.Data)+len(fields))
|
||||||
for k, v := range entry.Data {
|
for k, v := range entry.Data {
|
||||||
data[k] = v
|
data[k] = v
|
||||||
|
2
vendor/github.com/sirupsen/logrus/go.mod
generated
vendored
2
vendor/github.com/sirupsen/logrus/go.mod
generated
vendored
@ -2,7 +2,7 @@ module github.com/sirupsen/logrus
|
|||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/davecgh/go-spew v1.1.1 // indirect
|
github.com/davecgh/go-spew v1.1.1 // indirect
|
||||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1
|
github.com/konsorten/go-windows-terminal-sequences v1.0.3
|
||||||
github.com/pmezard/go-difflib v1.0.0 // indirect
|
github.com/pmezard/go-difflib v1.0.0 // indirect
|
||||||
github.com/stretchr/testify v1.2.2
|
github.com/stretchr/testify v1.2.2
|
||||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894
|
golang.org/x/sys v0.0.0-20190422165155-953cdadca894
|
||||||
|
8
vendor/github.com/sirupsen/logrus/text_formatter.go
generated
vendored
8
vendor/github.com/sirupsen/logrus/text_formatter.go
generated
vendored
@ -37,6 +37,11 @@ type TextFormatter struct {
|
|||||||
// Force quoting of all values
|
// Force quoting of all values
|
||||||
ForceQuote bool
|
ForceQuote bool
|
||||||
|
|
||||||
|
// DisableQuote disables quoting for all values.
|
||||||
|
// DisableQuote will have a lower priority than ForceQuote.
|
||||||
|
// If both of them are set to true, quote will be forced on all values.
|
||||||
|
DisableQuote bool
|
||||||
|
|
||||||
// Override coloring based on CLICOLOR and CLICOLOR_FORCE. - https://bixense.com/clicolors/
|
// Override coloring based on CLICOLOR and CLICOLOR_FORCE. - https://bixense.com/clicolors/
|
||||||
EnvironmentOverrideColors bool
|
EnvironmentOverrideColors bool
|
||||||
|
|
||||||
@ -292,6 +297,9 @@ func (f *TextFormatter) needsQuoting(text string) bool {
|
|||||||
if f.QuoteEmptyFields && len(text) == 0 {
|
if f.QuoteEmptyFields && len(text) == 0 {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
if f.DisableQuote {
|
||||||
|
return false
|
||||||
|
}
|
||||||
for _, ch := range text {
|
for _, ch := range text {
|
||||||
if !((ch >= 'a' && ch <= 'z') ||
|
if !((ch >= 'a' && ch <= 'z') ||
|
||||||
(ch >= 'A' && ch <= 'Z') ||
|
(ch >= 'A' && ch <= 'Z') ||
|
||||||
|
Loading…
Reference in New Issue
Block a user