Monday, June 4, 2012

Eclipse Java Template for Apache Commons Logging

If you use Eclipse and want to save some typing, here is a template for Eclipse to generate an Apache Commons Logging Log for the class you are currently working on.

private static final Log LOG = LogFactory.getLog(${primary_type_name}.class);

To use it, open preferences > java > editor > templates, create a new template with the name "log" and paste the code above in the Pattern field.

No comments:

Post a Comment