private static final Logger LOGGER = Logger.getLogger(BuggyBread.class); public static void main(String[] args) { try { // Do Something } catch (Throwable t) { LOGGER.error("Shit Happens"); } finally { // release the connections } }