You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by GitBox <gi...@apache.org> on 2022/12/14 08:34:22 UTC

[GitHub] [incubator-eventmesh] Alonexc opened a new issue, #2594: [Enhancement] Method passes a simple String.format result to an SLF4J's or Log4j2's format string [EventMeshTcpMonitor]

Alonexc opened a new issue, #2594:
URL: https://github.com/apache/incubator-eventmesh/issues/2594

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/eventmesh/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Enhancement Request
   
   ![image](https://user-images.githubusercontent.com/91315508/207543126-b99350ac-f83a-496d-90da-557c1d62f947.png)
   ![image](https://user-images.githubusercontent.com/91315508/207543125-a1d6c945-c7ac-4249-91c7-01f3d1d9debe.png)
   located at:
   eventmesh-runtime/src/main/java/org/apache/eventmesh/runtime/metrics/tcp/EventMeshTcpMonitor.java line 127,133,139,145,151,157,163,176
   analysis and explanation:
   This method uses an SLF4J or Log4J2 logger to log a string which was produced through a call to String.format, where the format string passed was a constant string containing only simple format markers that could be directly handled by SLF4J or Log4J.
   
   
   ### Describe the solution you'd like
   
   Change ‘logger.error(String.format("This %s is an error", s));’to ‘logger.error("This {} is an error", s)’;.
   Reference example:
   ![image](https://user-images.githubusercontent.com/91315508/207543198-0f11e621-f245-4da6-8b7d-aa5d0060b978.png)
   ![image](https://user-images.githubusercontent.com/91315508/207543209-46056240-4d90-4838-871c-9a717de841b1.png)
   
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] jonyangx closed issue #2594: [Enhancement] Method passes a simple String.format result to an SLF4J's or Log4j2's format string [EventMeshTcpMonitor]

Posted by GitBox <gi...@apache.org>.
jonyangx closed issue #2594: [Enhancement] Method passes a simple String.format result to an SLF4J's or Log4j2's format string [EventMeshTcpMonitor]
URL: https://github.com/apache/incubator-eventmesh/issues/2594


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org