code: public static void log( String context , JMSException e , Log log )
  	{
  		StringBuilder message = new StringBuilder();
  		if (context != null)
  		{
  			message.append("[");
  			message.append(context);
  			message.append("] ");
  		} 
  		if (e.getErrorCode() != null)
  		{
  			message.append("error={");
  			message.append(e.getErrorCode());
  			message.append("} ");
  		}
  		message.append(e.getMessage());
  		log.error(message.toString());
  		if (e.getLinkedException() != null)
  			log.error("Linked exception was :",e.getLinkedException());
  	}
docs: Log a JMS exception with an error level
  @param e
  @param log