mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-04-05 04:59:18 +00:00
Fix logger error append logic.
Signed-off-by: zhanluxianshen <zhanluxianshen@163.com>
This commit is contained in:
parent
b142091234
commit
3eb533e416
@ -74,8 +74,10 @@ func (l *Logger) Update(filename string, logLevel string, argv []string) {
|
||||
if argLogFile != nil {
|
||||
logFiles = append(logFiles, argLogFile)
|
||||
}
|
||||
if err != nil {
|
||||
argLogFileError = errors.Join(argLogFileError, err)
|
||||
}
|
||||
}
|
||||
defer func() {
|
||||
if argLogFileError != nil {
|
||||
l.Warningf("Failed to open log file: %v", argLogFileError)
|
||||
|
Loading…
Reference in New Issue
Block a user