-
Notifications
You must be signed in to change notification settings - Fork 5.7k
fix(logging): Handle closing correctly and fix tests #16539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems that these
const (
LogTargetFile = "file"
LogTargetStderr = "stderr"
)
are unused in text_logger.go
I know and this is on purpose. PR #15514 has the details... |
@srebhan |
8275c31
to
ab6f501
Compare
Download PR build artifacts for linux_amd64.tar.gz, darwin_arm64.tar.gz, and windows_amd64.zip. 👍 This pull request doesn't change the Telegraf binary size 📦 Click here to get additional PR build artifactsArtifact URLs |
(cherry picked from commit 26fc051)
Summary
This PR makes closing of the logging infrastructure more robust by
stderr
in structured-loggingand fixes the unit tests by
t.TempDir
everywhere to make sure we clean upos.CreateTemp
to not leave open files behindChecklist
Related issues
replaces #16459