Skip to content

Commit 685cf90

Browse files
log rotation does not respect previous target (#797)
Submitting this as they are blocked because of Test infra issue. Change is scoped
1 parent c9d1841 commit 685cf90

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

log/logger.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ func (logger *Logger) getLogFileName() string {
131131
return logFileName
132132
}
133133

134+
// todo: handle errors and use atomic file rotation
134135
// Rotate checks the active log file size and rotates log files if necessary.
135136
func (logger *Logger) rotate() {
136137
// Return if target is not a log file.
@@ -164,7 +165,7 @@ func (logger *Logger) rotate() {
164165
}
165166

166167
// Create a new log file.
167-
logger.SetTarget(TargetLogfile)
168+
logger.SetTarget(logger.target)
168169
}
169170
}
170171

0 commit comments

Comments
 (0)