The AppEngine admin console log viewer is so powerful that it makes me want to log anything and everything. One obstacle to this (however minor) is that it’s a pain to write this for every class in which I want to log:
private static final Logger LOG = Logger.getLogger(MyLongClassName.class.getName());
Eclipse code templates to the rescue! Open Window | Preferences | Java | Editor | Templates and create a new template. Name it “log”, set the context to “Java type members”, and enter this pattern:
private static final Logger LOG = Logger.getLogger(${enclosing_type}.class.getName()); ${imp:import(java.util.logging.Logger)}${cursor}
Click OK to save it. Now open any class in the editor, and type “log” followed by Ctrl-Space. Press Enter. Presto!
I feel a template for AsyncCallbacks coming on…