I would like a new logging annotation that could accept a factory class as a
parameter, and would then generate the log field.
For example,
import com.mycompany.MyLoggerFactory;
@Logger(factory=MyLoggerFactory.class)
public class MyClass {
public static void doStuff() {
log.info("some stuff");
}
}
would become
import com.mycompany.MyLoggerFactory;
public class MyClass {
private static final java.util.logging.Logger log = com.mycompany.MyLoggerFactory.getLogger(MyClass.class);
public static void doStuff() {
log.info("some stuff");
}
}
This would make it convenient to add custom loggers, in particular loggers that
had custom methods on them that would allow for logging structured data.
Original issue reported on code.google.com by Robot.Ni...@gmail.com on 1 May 2015 at 8:00
Original issue reported on code.google.com by
Robot.Ni...@gmail.com
on 1 May 2015 at 8:00