Mercurial Hosting > luan
changeset 280:2164b4479661
log web exceptions
git-svn-id: https://luan-java.googlecode.com/svn/trunk@281 21e917c8-12df-6dd8-5cb6-c86387c605b9
author | fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9> |
---|---|
date | Mon, 24 Nov 2014 22:22:01 +0000 |
parents | 8b738caea941 |
children | a1fa4fba99de |
files | web/src/luan/modules/web/LuanHandler.java |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/web/src/luan/modules/web/LuanHandler.java Mon Nov 24 21:11:56 2014 +0000 +++ b/web/src/luan/modules/web/LuanHandler.java Mon Nov 24 22:22:01 2014 +0000 @@ -5,6 +5,8 @@ import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.eclipse.jetty.server.Request; import org.eclipse.jetty.server.handler.AbstractHandler; import luan.LuanState; @@ -12,6 +14,7 @@ public class LuanHandler extends AbstractHandler { + private static final Logger logger = LoggerFactory.getLogger(LuanHandler.class); private final LuanState luan; private String welcomeFile = "index.html"; @@ -29,8 +32,9 @@ return; response.setStatus(HttpServletResponse.SC_OK); } catch(LuanException e) { -//e.printStackTrace(); - response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,e.getFullMessage()); + String err = e.getFullMessage(); + logger.error(err); + response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,err); } baseRequest.setHandled(true); }