Add info about status code in error logging

FEA: ItEr76S04BugFixing
This commit is contained in:
Manuel Rego Casasnovas 2012-06-20 09:54:55 +02:00
parent f933522d21
commit eddcbca243

View file

@ -3,7 +3,7 @@
*
* Copyright (C) 2009-2010 Fundación para o Fomento da Calidade Industrial e
* Desenvolvemento Tecnolóxico de Galicia
* Copyright (C) 2010-2011 Igalia, S.L.
* Copyright (C) 2010-2012 Igalia, S.L.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@ -57,6 +57,11 @@ public class PageForErrorOnEvent extends GenericForwardComposer {
"javax.servlet.error.exception");
String errorMessage = (String) Executions.getCurrent().getAttribute(
"javax.servlet.error.message");
Integer code = (Integer) Executions.getCurrent().getAttribute(
"javax.servlet.error.status_code");
if (code != null) {
errorMessage += " [Status Code: " + code + "]";
}
LOG.error(errorMessage, exception);
}