Merge pull request #10351 from containerd/dependabot/go_modules/k8s-1b02c00507
build(deps): bump k8s.io/klog/v2 from 2.120.1 to 2.130.0 in the k8s group
This commit is contained in:
25
vendor/k8s.io/klog/v2/klog.go
generated
vendored
25
vendor/k8s.io/klog/v2/klog.go
generated
vendored
@@ -1011,7 +1011,8 @@ func (l *loggingT) exit(err error) {
|
||||
logExitFunc(err)
|
||||
return
|
||||
}
|
||||
l.flushAll()
|
||||
files := l.flushAll()
|
||||
l.syncAll(files)
|
||||
OsExit(2)
|
||||
}
|
||||
|
||||
@@ -1223,24 +1224,38 @@ func StartFlushDaemon(interval time.Duration) {
|
||||
// lockAndFlushAll is like flushAll but locks l.mu first.
|
||||
func (l *loggingT) lockAndFlushAll() {
|
||||
l.mu.Lock()
|
||||
l.flushAll()
|
||||
files := l.flushAll()
|
||||
l.mu.Unlock()
|
||||
// Some environments are slow when syncing and holding the lock might cause contention.
|
||||
l.syncAll(files)
|
||||
}
|
||||
|
||||
// flushAll flushes all the logs and attempts to "sync" their data to disk.
|
||||
// flushAll flushes all the logs
|
||||
// l.mu is held.
|
||||
func (l *loggingT) flushAll() {
|
||||
func (l *loggingT) flushAll() []flushSyncWriter {
|
||||
files := make([]flushSyncWriter, 0, severity.NumSeverity)
|
||||
// Flush from fatal down, in case there's trouble flushing.
|
||||
for s := severity.FatalLog; s >= severity.InfoLog; s-- {
|
||||
file := l.file[s]
|
||||
if file != nil {
|
||||
_ = file.Flush() // ignore error
|
||||
_ = file.Sync() // ignore error
|
||||
}
|
||||
files = append(files, file)
|
||||
}
|
||||
if logging.loggerOptions.flush != nil {
|
||||
logging.loggerOptions.flush()
|
||||
}
|
||||
return files
|
||||
}
|
||||
|
||||
// syncAll attempts to "sync" their data to disk.
|
||||
func (l *loggingT) syncAll(files []flushSyncWriter) {
|
||||
// Flush from fatal down, in case there's trouble flushing.
|
||||
for _, file := range files {
|
||||
if file != nil {
|
||||
_ = file.Sync() // ignore error
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// CopyStandardLogTo arranges for messages written to the Go "log" package's
|
||||
|
||||
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@@ -816,7 +816,7 @@ k8s.io/component-base/logs/logreduction
|
||||
## explicit; go 1.22.0
|
||||
k8s.io/cri-api/pkg/apis/runtime/v1
|
||||
k8s.io/cri-api/pkg/errors
|
||||
# k8s.io/klog/v2 v2.120.1
|
||||
# k8s.io/klog/v2 v2.130.0
|
||||
## explicit; go 1.18
|
||||
k8s.io/klog/v2
|
||||
k8s.io/klog/v2/internal/buffer
|
||||
|
||||
Reference in New Issue
Block a user