From a3aa839d751b04f1898b728fc9b8bc9e65352b21 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 14 May 2011 12:56:50 -0700 Subject: Stop spamming Nebadon's console when assets aren't found in the asset server. --- OpenSim/Framework/WebUtil.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index 27a646a..5628376 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs @@ -979,8 +979,11 @@ namespace OpenSim.Framework try { - using (WebResponse resp = request.GetResponse()) + using (HttpWebResponse resp = (HttpWebResponse)request.GetResponse()) { + if (resp.StatusCode == HttpStatusCode.NotFound) + return deserial; + if (resp.ContentLength != 0) { Stream respStream = resp.GetResponseStream(); -- cgit v1.1 From be6feff331a97b1e976ca52aa0012f24c837e5d6 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 14 May 2011 13:09:59 -0700 Subject: Also changed a couple of messages in WebUtil from Wanr/Info to Debug. --- OpenSim/Framework/WebUtil.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index 5628376..9323607 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs @@ -251,11 +251,11 @@ namespace OpenSim.Framework // This just dumps a warning for any operation that takes more than 100 ms int tickdiff = Util.EnvironmentTickCountSubtract(tickstart); if (tickdiff > LongCallTime) - m_log.InfoFormat("[WEB UTIL]: osd request <{0}> (URI:{1}, METHOD:{2}) took {3}ms overall, {4}ms writing", + m_log.DebugFormat("[WEB UTIL]: osd request <{0}> (URI:{1}, METHOD:{2}) took {3}ms overall, {4}ms writing", reqnum,url,method,tickdiff,tickdata); } - m_log.WarnFormat("[WEB UTIL]: <{0}> osd request for {1}, method {2} FAILED: {3}", reqnum, url, method, errorMessage); + m_log.DebugFormat("[WEB UTIL]: <{0}> osd request for {1}, method {2} FAILED: {3}", reqnum, url, method, errorMessage); return ErrorResponseMap(errorMessage); } -- cgit v1.1 From a2f034c5546880215baae53184e591b2e4fd223f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 14 May 2011 13:36:55 -0700 Subject: Changed yet more Warns to Debugs. --- OpenSim/Framework/WebUtil.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index 9323607..147a011 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs @@ -967,7 +967,7 @@ namespace OpenSim.Framework } catch (Exception e) { - m_log.WarnFormat("[SynchronousRestObjectRequester]: exception in sending data to {0}: {1}", requestUrl, e); + m_log.DebugFormat("[SynchronousRestObjectRequester]: exception in sending data to {0}: {1}", requestUrl, e); return deserial; } finally @@ -992,18 +992,18 @@ namespace OpenSim.Framework respStream.Close(); } else - m_log.WarnFormat("[SynchronousRestObjectRequester]: Oops! no content found in response stream from {0} {1}", requestUrl, verb); + m_log.DebugFormat("[SynchronousRestObjectRequester]: Oops! no content found in response stream from {0} {1}", requestUrl, verb); } } catch (System.InvalidOperationException) { // This is what happens when there is invalid XML - m_log.WarnFormat("[SynchronousRestObjectRequester]: Invalid XML {0} {1}", requestUrl, typeof(TResponse).ToString()); + m_log.DebugFormat("[SynchronousRestObjectRequester]: Invalid XML {0} {1}", requestUrl, typeof(TResponse).ToString()); } catch (Exception e) { - m_log.WarnFormat("[SynchronousRestObjectRequester]: Exception on response from {0} {1}", requestUrl, e); + m_log.DebugFormat("[SynchronousRestObjectRequester]: Exception on response from {0} {1}", requestUrl, e); } return deserial; -- cgit v1.1