Pil0tXia opened a new issue, #4734:
URL: https://github.com/apache/eventmesh/issues/4734

   ### 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
   
   In Java, it is a best practice to declare a logger static final.
   
   - `private` - so that no other class can hijack your logger
   - `static` - so there is only one logger instance per class, also avoiding 
attempts to serialize loggers
   - `final` - no need to change the logger over the lifetime of the class
   
   Location:
   
   Search for `private final Logger` in project source code.
   
   ### Describe the solution you'd like
   
   Add `static` modifier for `Logger`, rename `foobarLogger` to 
`FOOBAR_LOGGER`, and substitute logger name with constants.
   
   Take `org.apache.eventmesh.runtime.metrics.tcp.EventMeshTcpMonitor` as an 
example:
   
   
![image](https://github.com/apache/eventmesh/assets/41445332/10ddcc93-0682-47ff-8417-8ac241d8e014)
   
   You can add more constants in 
`org.apache.eventmesh.runtime.constants.EventMeshConstants`.
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct) *


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to