X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Ftorus.cpp;h=5352b9ab1700ac563d335be1c440ff6339ba9217;hb=6537605b578008fe0c57c209b72e97b9a9a4f5e5;hp=b5f0275761889790eee13f6646825375c564130e;hpb=73f37c91c144b070020df2f27472c09b62367acf;p=metaproxy-moved-to-github.git diff --git a/src/torus.cpp b/src/torus.cpp index b5f0275..5352b9a 100644 --- a/src/torus.cpp +++ b/src/torus.cpp @@ -1,5 +1,5 @@ /* This file is part of Metaproxy. - Copyright (C) 2005-2012 Index Data + Copyright (C) Index Data Metaproxy is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -70,18 +70,25 @@ xmlDoc *mp::get_searchable(mp::Package &package, if (http_response && http_response->code == 200 && http_response->content_buf) { - package.log("zoom", YLOG_LOG, "Torus: %s OK", url_template.c_str()); doc = xmlParseMemory(http_response->content_buf, http_response->content_len); - + if (doc) + package.log("zoom", YLOG_LOG, "Torus: %s OK", + url_template.c_str()); + else + package.log("zoom", YLOG_WARN, "Torus: %s FAIL. XML parse failed", + url_template.c_str()); } else { - package.log("zoom", YLOG_WARN, "Torus: %s FAIL", url_template.c_str()); if (http_response) { - package.log("zoom", YLOG_LOG, "HTTP code: %d", http_response->code); + package.log("zoom", YLOG_WARN, "Torus: %s FAIL. HTTP code %d", + url_template.c_str(), http_response->code); } + else + package.log("zoom", YLOG_WARN, "Torus: %s FAIL. No HTTP response", + url_template.c_str()); } if (http_response && http_response->content_buf)