From 858f800a07bfc4c0dd88f058324675042eebf2d4 Mon Sep 17 00:00:00 2001 From: orbiter Date: Mon, 9 Mar 2009 09:56:26 +0000 Subject: [PATCH] more logging in httpd to detect shutdown cause. See also: http://forum.yacy-websuche.de/viewtopic.php?f=6&t=1914&hilit=&p=13246#p13246 git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5683 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- source/de/anomic/http/httpd.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/source/de/anomic/http/httpd.java b/source/de/anomic/http/httpd.java index 9538121e3..770405984 100644 --- a/source/de/anomic/http/httpd.java +++ b/source/de/anomic/http/httpd.java @@ -520,17 +520,17 @@ public final class httpd implements serverHandler, Cloneable { final String errorMsg = e.getMessage(); if (errorMsg != null) { if (errorMsg.startsWith("Socket closed")) { - log.logInfo("httpd shutdown detected ..."); + log.logInfo("httpd shutdown detected ... (" + e.getMessage() + "), client = " + userAddress.getHostAddress()); } else if ((errorMsg.startsWith("Broken pipe") || errorMsg.startsWith("Connection reset"))) { // client closed the connection, so we just end silently - log.logInfo("Client unexpectedly closed connection"); + log.logInfo("Client unexpectedly closed connection... (" + e.getMessage() + "), client = " + userAddress.getHostAddress()); } else if (errorMsg.equals("400 Bad request")) { - log.logInfo("Bad client request."); + log.logInfo("Bad client request ... (" + e.getMessage() + "), client = " + userAddress.getHostAddress()); } else { - log.logSevere("Unexpected Error. " + e.getClass().getName() + ": " + e.getMessage(),e); + log.logSevere("Unexpected Error ... (" + e.getMessage() + "), client = " + userAddress.getHostAddress(),e); } } else { - log.logSevere("Unexpected Error. " + e.getClass().getName(),e); + log.logSevere("Unexpected Error ... (" + e.getMessage() + "), client = " + userAddress.getHostAddress(),e); } } }