logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pedro Costa" <pedro.co...@link.pt>
Subject Logger.error
Date Fri, 03 Feb 2006 12:45:15 GMT
The Logger.error is a good method to print java exceptions?

If so, if I catch two java exceptions, for example:

		try {
				//something
			} catch (PortletException e) {
				logger.error("Exception was: " + e);
			} catch (IOException e) {
				logger.error("Exception was: " + e);
},

Is it correct to change this snippet into something like this?

			try {
				//something
			} catch (Exception e) {
				logger.error("Exception was: " + e);
}
-----------------
PSC 



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message