diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/WebUtil.cs | 55 |
1 files changed, 38 insertions, 17 deletions
diff --git a/OpenSim/Framework/WebUtil.cs b/OpenSim/Framework/WebUtil.cs index aac575c..11967c9 100644 --- a/OpenSim/Framework/WebUtil.cs +++ b/OpenSim/Framework/WebUtil.cs | |||
@@ -86,8 +86,7 @@ namespace OpenSim.Framework | |||
86 | return eplock; | 86 | return eplock; |
87 | } | 87 | } |
88 | } | 88 | } |
89 | 89 | ||
90 | |||
91 | #region JSONRequest | 90 | #region JSONRequest |
92 | 91 | ||
93 | /// <summary> | 92 | /// <summary> |
@@ -217,7 +216,9 @@ namespace OpenSim.Framework | |||
217 | reqnum,url,method,tickdiff,tickdata); | 216 | reqnum,url,method,tickdiff,tickdata); |
218 | } | 217 | } |
219 | 218 | ||
220 | m_log.DebugFormat("[WEB UTIL]: <{0}> osd request for {1}, method {2} FAILED: {3}", reqnum, url, method, errorMessage); | 219 | m_log.DebugFormat( |
220 | "[WEB UTIL]: <{0}> osd request for {1}, method {2} FAILED: {3}", reqnum, url, method, errorMessage); | ||
221 | |||
221 | return ErrorResponseMap(errorMessage); | 222 | return ErrorResponseMap(errorMessage); |
222 | } | 223 | } |
223 | 224 | ||
@@ -358,7 +359,8 @@ namespace OpenSim.Framework | |||
358 | reqnum,url,method,tickdiff,tickdata); | 359 | reqnum,url,method,tickdiff,tickdata); |
359 | } | 360 | } |
360 | 361 | ||
361 | m_log.WarnFormat("[WEB UTIL]: <{0}> form request failed: {1}",reqnum,errorMessage); | 362 | m_log.WarnFormat("[WEB UTIL]: <{0}> form request to {1} failed: {2}", reqnum, url, errorMessage); |
363 | |||
362 | return ErrorResponseMap(errorMessage); | 364 | return ErrorResponseMap(errorMessage); |
363 | } | 365 | } |
364 | 366 | ||
@@ -772,12 +774,16 @@ namespace OpenSim.Framework | |||
772 | } | 774 | } |
773 | else | 775 | else |
774 | { | 776 | { |
775 | m_log.ErrorFormat("[ASYNC REQUEST]: Request {0} {1} failed with status {2} and message {3}", verb, requestUrl, e.Status, e.Message); | 777 | m_log.ErrorFormat( |
778 | "[ASYNC REQUEST]: Request {0} {1} failed with status {2} and message {3}", | ||
779 | verb, requestUrl, e.Status, e.Message); | ||
776 | } | 780 | } |
777 | } | 781 | } |
778 | catch (Exception e) | 782 | catch (Exception e) |
779 | { | 783 | { |
780 | m_log.ErrorFormat("[ASYNC REQUEST]: Request {0} {1} failed with exception {2}", verb, requestUrl, e); | 784 | m_log.ErrorFormat( |
785 | "[ASYNC REQUEST]: Request {0} {1} failed with exception {2}{3}", | ||
786 | verb, requestUrl, e.Message, e.StackTrace); | ||
781 | } | 787 | } |
782 | 788 | ||
783 | // m_log.DebugFormat("[ASYNC REQUEST]: Received {0}", deserial.ToString()); | 789 | // m_log.DebugFormat("[ASYNC REQUEST]: Received {0}", deserial.ToString()); |
@@ -789,7 +795,8 @@ namespace OpenSim.Framework | |||
789 | catch (Exception e) | 795 | catch (Exception e) |
790 | { | 796 | { |
791 | m_log.ErrorFormat( | 797 | m_log.ErrorFormat( |
792 | "[ASYNC REQUEST]: Request {0} {1} callback failed with exception {2}", verb, requestUrl, e); | 798 | "[ASYNC REQUEST]: Request {0} {1} callback failed with exception {2}{3}", |
799 | verb, requestUrl, e.Message, e.StackTrace); | ||
793 | } | 800 | } |
794 | 801 | ||
795 | }, null); | 802 | }, null); |
@@ -842,7 +849,8 @@ namespace OpenSim.Framework | |||
842 | } | 849 | } |
843 | catch (Exception e) | 850 | catch (Exception e) |
844 | { | 851 | { |
845 | m_log.DebugFormat("[FORMS]: exception occured on sending request to {0}: " + e.ToString(), requestUrl); | 852 | m_log.DebugFormat( |
853 | "[FORMS]: exception occured {0} {1}: {2}{3}", verb, requestUrl, e.Message, e.StackTrace); | ||
846 | } | 854 | } |
847 | finally | 855 | finally |
848 | { | 856 | { |
@@ -868,7 +876,9 @@ namespace OpenSim.Framework | |||
868 | } | 876 | } |
869 | catch (Exception e) | 877 | catch (Exception e) |
870 | { | 878 | { |
871 | m_log.DebugFormat("[FORMS]: exception occured on receiving reply " + e.ToString()); | 879 | m_log.DebugFormat( |
880 | "[FORMS]: Exception occured on receiving {0} {1}: {2}{3}", | ||
881 | verb, requestUrl, e.Message, e.StackTrace); | ||
872 | } | 882 | } |
873 | finally | 883 | finally |
874 | { | 884 | { |
@@ -881,7 +891,7 @@ namespace OpenSim.Framework | |||
881 | catch (System.InvalidOperationException) | 891 | catch (System.InvalidOperationException) |
882 | { | 892 | { |
883 | // This is what happens when there is invalid XML | 893 | // This is what happens when there is invalid XML |
884 | m_log.DebugFormat("[FORMS]: InvalidOperationException on receiving request"); | 894 | m_log.DebugFormat("[FORMS]: InvalidOperationException on receiving {0} {1}", verb, requestUrl); |
885 | } | 895 | } |
886 | } | 896 | } |
887 | return respstring; | 897 | return respstring; |
@@ -946,7 +956,10 @@ namespace OpenSim.Framework | |||
946 | } | 956 | } |
947 | catch (Exception e) | 957 | catch (Exception e) |
948 | { | 958 | { |
949 | m_log.DebugFormat("[SynchronousRestObjectRequester]: exception in sending data to {0}: {1}", requestUrl, e); | 959 | m_log.DebugFormat( |
960 | "[SynchronousRestObjectRequester]: Exception in making request {0} {1}: {2}{3}", | ||
961 | verb, requestUrl, e.Message, e.StackTrace); | ||
962 | |||
950 | return deserial; | 963 | return deserial; |
951 | } | 964 | } |
952 | finally | 965 | finally |
@@ -968,7 +981,11 @@ namespace OpenSim.Framework | |||
968 | respStream.Close(); | 981 | respStream.Close(); |
969 | } | 982 | } |
970 | else | 983 | else |
971 | m_log.DebugFormat("[SynchronousRestObjectRequester]: Oops! no content found in response stream from {0} {1}", requestUrl, verb); | 984 | { |
985 | m_log.DebugFormat( | ||
986 | "[SynchronousRestObjectRequester]: Oops! no content found in response stream from {0} {1}", | ||
987 | verb, requestUrl); | ||
988 | } | ||
972 | } | 989 | } |
973 | } | 990 | } |
974 | catch (WebException e) | 991 | catch (WebException e) |
@@ -979,20 +996,24 @@ namespace OpenSim.Framework | |||
979 | return deserial; | 996 | return deserial; |
980 | else | 997 | else |
981 | m_log.ErrorFormat( | 998 | m_log.ErrorFormat( |
982 | "[SynchronousRestObjectRequester]: WebException {0} {1} {2} {3}", | 999 | "[SynchronousRestObjectRequester]: WebException for {0} {1} {2}: {3} {4}", |
983 | requestUrl, typeof(TResponse).ToString(), e.Message, e.StackTrace); | 1000 | verb, requestUrl, typeof(TResponse).ToString(), e.Message, e.StackTrace); |
984 | } | 1001 | } |
985 | catch (System.InvalidOperationException) | 1002 | catch (System.InvalidOperationException) |
986 | { | 1003 | { |
987 | // This is what happens when there is invalid XML | 1004 | // This is what happens when there is invalid XML |
988 | m_log.DebugFormat("[SynchronousRestObjectRequester]: Invalid XML {0} {1}", requestUrl, typeof(TResponse).ToString()); | 1005 | m_log.DebugFormat( |
1006 | "[SynchronousRestObjectRequester]: Invalid XML from {0} {1} {2}", | ||
1007 | verb, requestUrl, typeof(TResponse).ToString()); | ||
989 | } | 1008 | } |
990 | catch (Exception e) | 1009 | catch (Exception e) |
991 | { | 1010 | { |
992 | m_log.DebugFormat("[SynchronousRestObjectRequester]: Exception on response from {0} {1}", requestUrl, e); | 1011 | m_log.DebugFormat( |
1012 | "[SynchronousRestObjectRequester]: Exception on response from {0} {1}: {2}{3}", | ||
1013 | verb, requestUrl, e.Message, e.StackTrace); | ||
993 | } | 1014 | } |
994 | 1015 | ||
995 | return deserial; | 1016 | return deserial; |
996 | } | 1017 | } |
997 | } | 1018 | } |
998 | } | 1019 | } \ No newline at end of file |