That’s interesting: http://www.eecg.toronto.edu/~yuan/papers/p125-Zhao.pdf
using profiling information to automatically place log statements (at the bytecode level)