Skip to content

Commit

Permalink
Reset lastFlush properly
Browse files Browse the repository at this point in the history
  • Loading branch information
jrmccluskey committed Sep 12, 2023
1 parent 9ce0e01 commit 0dc7314
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sdks/go/container/tools/buffered_logging.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ func (b *BufferedLogger) FlushAtError(ctx context.Context) {
b.logger.Errorf(ctx, message)
}
b.logs = nil
b.lastFlush = time.Now()
}

// FlushAtDebug flushes the contents of the buffer to the logging
Expand All @@ -90,6 +91,7 @@ func (b *BufferedLogger) FlushAtDebug(ctx context.Context) {
b.logger.Printf(ctx, message)
}
b.logs = nil
b.lastFlush = time.Now()
}

// Prints directly to the logging service. If the logger is nil, prints directly to the
Expand Down

0 comments on commit 0dc7314

Please sign in to comment.