Is it possible to create annotation to expose a custom Logger variable into the class for direct use, so that I don't have to do something to the effect of:
Logger logger = CustomerLoggerFactory.getLogger(MyClass.class);
It would be nice if the above was implicitly available due to the annotation and I could just go about doing logger.debug("..."); without the declaration.
Similar question is asked https://stackoverflow.com/questions/6351082/using-java-annotation-to-inject-logger-dependency
for Spring and all answers are Spring specific. I am looking for simple Java.
Edit: I cannot use lombok as the IBM product I am developing for provides its own logger factories and those the only way to get a logger via MXLogger.getLogger(key) method