diff options
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/GridAssetClient.cs')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/GridAssetClient.cs | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs index 2f0727f..48d9ec8 100644 --- a/OpenSim/Framework/Communications/Cache/GridAssetClient.cs +++ b/OpenSim/Framework/Communications/Cache/GridAssetClient.cs | |||
@@ -36,6 +36,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
36 | { | 36 | { |
37 | public class GridAssetClient : AssetServerBase | 37 | public class GridAssetClient : AssetServerBase |
38 | { | 38 | { |
39 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
40 | |||
39 | private string _assetServerUrl; | 41 | private string _assetServerUrl; |
40 | 42 | ||
41 | public GridAssetClient(string serverUrl) | 43 | public GridAssetClient(string serverUrl) |
@@ -50,7 +52,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
50 | Stream s = null; | 52 | Stream s = null; |
51 | try | 53 | try |
52 | { | 54 | { |
53 | MainLog.Instance.Debug("ASSETCACHE", "Querying for {0}", req.AssetID.ToString()); | 55 | m_log.Debug(String.Format("[ASSETCACHE]: Querying for {0}", req.AssetID.ToString())); |
54 | 56 | ||
55 | RestClient rc = new RestClient(_assetServerUrl); | 57 | RestClient rc = new RestClient(_assetServerUrl); |
56 | rc.AddResourcePath("assets"); | 58 | rc.AddResourcePath("assets"); |
@@ -70,9 +72,9 @@ namespace OpenSim.Framework.Communications.Cache | |||
70 | } | 72 | } |
71 | catch (Exception e) | 73 | catch (Exception e) |
72 | { | 74 | { |
73 | MainLog.Instance.Error("ASSETCACHE", e.Message); | 75 | m_log.Error("[ASSETCACHE]: " + e.Message); |
74 | MainLog.Instance.Debug("ASSETCACHE", "Getting asset {0}", req.AssetID.ToString()); | 76 | m_log.Debug(String.Format("[ASSETCACHE]: Getting asset {0}", req.AssetID.ToString())); |
75 | MainLog.Instance.Error("ASSETCACHE", e.StackTrace); | 77 | m_log.Error("[ASSETCACHE]: " + e.StackTrace); |
76 | } | 78 | } |
77 | 79 | ||
78 | return null; | 80 | return null; |
@@ -93,19 +95,19 @@ namespace OpenSim.Framework.Communications.Cache | |||
93 | // XmlSerializer xs = new XmlSerializer(typeof(AssetBase)); | 95 | // XmlSerializer xs = new XmlSerializer(typeof(AssetBase)); |
94 | // xs.Serialize(s, asset); | 96 | // xs.Serialize(s, asset); |
95 | // RestClient rc = new RestClient(_assetServerUrl); | 97 | // RestClient rc = new RestClient(_assetServerUrl); |
96 | MainLog.Instance.Verbose("ASSET", "Storing asset"); | 98 | m_log.Info("[ASSET]: Storing asset"); |
97 | //rc.AddResourcePath("assets"); | 99 | //rc.AddResourcePath("assets"); |
98 | 100 | ||
99 | // rc.RequestMethod = "POST"; | 101 | // rc.RequestMethod = "POST"; |
100 | // rc.Request(s); | 102 | // rc.Request(s); |
101 | //MainLog.Instance.Verbose("ASSET", "Stored {0}", rc); | 103 | //m_log.Info(String.Format("[ASSET]: Stored {0}", rc)); |
102 | MainLog.Instance.Verbose("ASSET", "Sending to " + _assetServerUrl + "/assets/"); | 104 | m_log.Info("[ASSET]: Sending to " + _assetServerUrl + "/assets/"); |
103 | RestObjectPoster.BeginPostObject<AssetBase>(_assetServerUrl + "/assets/", asset); | 105 | RestObjectPoster.BeginPostObject<AssetBase>(_assetServerUrl + "/assets/", asset); |
104 | 106 | ||
105 | } | 107 | } |
106 | catch (Exception e) | 108 | catch (Exception e) |
107 | { | 109 | { |
108 | MainLog.Instance.Error("ASSETS", e.Message); | 110 | m_log.Error("[ASSETS]: " + e.Message); |
109 | } | 111 | } |
110 | } | 112 | } |
111 | 113 | ||