Hi At the company I work for we use the same logging pattern almost everywhere, for example:
public class SomeClass { private static final Logger log = LoggerFactory.getLogger(SomeClass.class); public void someMethod() { log.debug("A log message"); } } I would like to simplify this to: import static logging.LogApi.*; public class SomeClass { private void someMethod(String someArg) { debug("A log message"); // from static import } } And then have code equivalent to the former generated (preferably at class load time) dynamically. This could save us hundreds of lines of boilerplate code and provide other interesting options like declarative rules regarding the "injected" logger name, perhaps through class/method annotations and pre-calculating the source location information. I thought of implementing this with AspectJ but its probably easier to just use ASM directly for such a simple case. Any ideas/suggestions/precedents? Thanks Ramon
signature.asc
Description: This is a digitally signed message part
_______________________________________________ logback-dev mailing list logback-dev@qos.ch http://qos.ch/mailman/listinfo/logback-dev