Hi,
I have built a
Java Spring Boot application, and I am using "log4j" for logging,
And in order to use the logger class, I do this:
But I think this is a mistake because I better encapsulate away all the "log4j" stuff inside a logger class and inject that class to other classes.
For example, I need to be able to do this:
This logger should print the "ExampleController" class name on the logs.
How can I implement the "AppLogger" so that it gets the correct class name without having to pass it through the constructor?