Ver código fonte

Merge pull request #41506 from thaJeztah/bump_coreos_pkg

vendor: github.com/coreos/pkg v4
Brian Goff 4 anos atrás
pai
commit
4f36654057

+ 1 - 1
vendor.conf

@@ -153,7 +153,7 @@ golang.org/x/time                                   555d28b269f0569763d25dbe1a23
 github.com/hashicorp/go-memdb                       cb9a474f84cc5e41b273b20c6927680b2a8776ad
 github.com/hashicorp/go-immutable-radix             826af9ccf0feeee615d546d69b11f8e98da8c8f1 git://github.com/tonistiigi/go-immutable-radix.git
 github.com/hashicorp/golang-lru                     7f827b33c0f158ec5dfbba01bb0b14a4541fd81d # v0.5.3
-github.com/coreos/pkg                               3ac0863d7acf3bc44daf49afef8919af12f704ef # v3
+github.com/coreos/pkg                               97fdf19511ea361ae1c100dd393cc47f8dcfa1e1 # v4
 code.cloudfoundry.org/clock                         02e53af36e6c978af692887ed449b74026d76fec # v1.0.0
 
 # prometheus

+ 1 - 1
vendor/github.com/coreos/pkg/capnslog/README.md

@@ -21,7 +21,7 @@ Still the job of `main` to expose these configurations. `main` may delegate this
 
 Splitting streams is probably not the job of your program, but rather, your log aggregation framework. If you must split output streams, again, `main` configures this and you can write a very simple two-output struct that satisfies io.Writer.
 
-Fancy colorful formatting and JSON output are beyond the scope of a basic logging framework -- they're application/log-collector dependant. These are, at best, provided as options, but more likely, provided by your application.
+Fancy colorful formatting and JSON output are beyond the scope of a basic logging framework -- they're application/log-collector dependent. These are, at best, provided as options, but more likely, provided by your application.
 
 ##### Log objects are an interface
 

+ 5 - 0
vendor/github.com/coreos/pkg/capnslog/logmap.go

@@ -95,6 +95,11 @@ func (l *LogLevel) Set(s string) error {
 	return nil
 }
 
+// Returns an empty string, only here to fulfill the pflag.Value interface.
+func (l *LogLevel) Type() string {
+	return ""
+}
+
 // ParseLevel translates some potential loglevel strings into their corresponding levels.
 func ParseLevel(s string) (LogLevel, error) {
 	switch s {

+ 14 - 0
vendor/github.com/coreos/pkg/capnslog/pkg_logger.go

@@ -37,6 +37,14 @@ func (p *PackageLogger) internalLog(depth int, inLevel LogLevel, entries ...inte
 	}
 }
 
+// SetLevel allows users to change the current logging level.
+func (p *PackageLogger) SetLevel(l LogLevel) {
+	logger.Lock()
+	defer logger.Unlock()
+	p.level = l
+}
+
+// LevelAt checks if the given log level will be outputted under current setting.
 func (p *PackageLogger) LevelAt(l LogLevel) bool {
 	logger.Lock()
 	defer logger.Unlock()
@@ -81,6 +89,12 @@ func (p *PackageLogger) Panic(args ...interface{}) {
 	panic(s)
 }
 
+func (p *PackageLogger) Panicln(args ...interface{}) {
+	s := fmt.Sprintln(args...)
+	p.internalLog(calldepth, CRITICAL, s)
+	panic(s)
+}
+
 func (p *PackageLogger) Fatalf(format string, args ...interface{}) {
 	p.Logf(CRITICAL, format, args...)
 	os.Exit(1)