HttpServletRequest request,
HttpServletResponse response,
ServletContext application)
throws IOException
{
WriteStream logStream = getLogStream();
if (logStream == null)
return;
Throwable t = e;
while (t != null) {
e = t;
if (e instanceof ServletException)
t = ((ServletException) e).getRootCause();
else if (e instanceof ExceptionWrapper)
t = ((ExceptionWrapper) e).getRootCause();
else
t = null;
}
CharBuffer cb = CharBuffer.allocate();
QDate.formatLocal(cb, Alarm.getCurrentTime(), "[%Y/%m/%d %H:%M:%S] ");
cb.append(message);
logStream.log(cb.close());
if (e != null && ! (e instanceof CompileException))
logStream.log(e);
logStream.flush();
}