Skip to content
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

[Enhancement] Method passes a concatenated string to SLF4J's or Log4j2's format string [ConsumerService] #2723

Closed
1 of 2 tasks
Alonexc opened this issue Dec 29, 2022 · 0 comments · Fixed by #2744
Closed
1 of 2 tasks
Labels
enhancement New feature or request good first issue Issues for first-time contributors

Comments

@Alonexc
Copy link
Contributor

Alonexc commented Dec 29, 2022

Search before asking

  • I had searched in the issues and found no similar issues.

Enhancement Request

image
located at:
eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/core/protocol/grpc/service/ConsumerService.java line 100
analysis and explanation:
This method uses an SLF4J or Log4j2 logger to log a string, where the first (format) string is created using concatenation. You should use {} markers to inject dynamic content into the string, so that String building is delayed until the actual log string is needed. If the log level is high enough that this log statement isn't used, then the appends will never be executed.

Describe the solution you'd like

use {} markers to inject dynamic content into the string

Are you willing to submit PR?

  • Yes I am willing to submit a PR!
@Alonexc Alonexc added the enhancement New feature or request label Dec 29, 2022
@xwm1992 xwm1992 added the good first issue Issues for first-time contributors label Dec 29, 2022
xwm1992 added a commit that referenced this issue Dec 31, 2022
[ISSUE #2723]  Method passes a concatenated string to SLF4J's or Log4j2's format string [ConsumerService]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Issues for first-time contributors
Projects
None yet
2 participants