Skip to content

fix(logging): Add back constants for backward compatibility #15514

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

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

zmyzheng
Copy link
Contributor

Summary

Before v1.31.0, Telegraf had some public constants inside logging package: https://github.com/influxdata/telegraf/blob/release-1.30/logger/logger.go#L20~#L23. Starting from v1.31.0, these constants are removed and hard-coded strings are used instead in the code. This seems to be a breaking change for some projects referring to these constants. This change is not announced in the release announcement of v1.31.0 as well. It would be great if we can add back those constants to Telegraf source code to have a consistent behavior as the historical code and avoid hard-coded string in the source code.

Checklist

  • No AI generated code was used in this PR

Related issues

resolves #15513

@telegraf-tiger
Copy link
Contributor

@powersj
Copy link
Contributor

powersj commented Jun 14, 2024

I've approved and will have others review, but again as I mentioned we don't guarantee backwards compatibility in these parts of the code. I fear we may unintentionally break you down the road again.

@powersj powersj added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Jun 14, 2024
@srebhan srebhan changed the title style(logging): add back constants existing before 1.31.0 Jun 17, 2024
@telegraf-tiger telegraf-tiger bot added the fix pr to fix corresponding bug label Jun 17, 2024
@srebhan srebhan merged commit c22dd1f into influxdata:master Jun 17, 2024
29 checks passed
@github-actions github-actions bot added this to the v1.31.1 milestone Jun 17, 2024
srebhan pushed a commit that referenced this pull request Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/logging fix pr to fix corresponding bug ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
4 participants