diff options
author | Jeff Ames | 2008-02-05 19:44:27 +0000 |
---|---|---|
committer | Jeff Ames | 2008-02-05 19:44:27 +0000 |
commit | 6ed5283bc06a62f38eb517e67b975832b603bf61 (patch) | |
tree | e5f635018789b73a99ddeca0883a68368fa5eece /OpenSim/Framework/Communications/Cache/AssetServerBase.cs | |
parent | Cut down on the number of packets sent during terraforming. Terraforming shou... (diff) | |
download | opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.zip opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.gz opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.bz2 opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.xz |
Converted logging to use log4net.
Changed LogBase to ConsoleBase, which handles console I/O.
This is mostly an in-place conversion, so lots of refactoring can still be done.
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/AssetServerBase.cs')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/AssetServerBase.cs | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs index 09f8a0c..1d8f6ba 100644 --- a/OpenSim/Framework/Communications/Cache/AssetServerBase.cs +++ b/OpenSim/Framework/Communications/Cache/AssetServerBase.cs | |||
@@ -37,6 +37,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
37 | { | 37 | { |
38 | public abstract class AssetServerBase : IAssetServer | 38 | public abstract class AssetServerBase : IAssetServer |
39 | { | 39 | { |
40 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | |||
40 | protected IAssetReceiver m_receiver; | 42 | protected IAssetReceiver m_receiver; |
41 | protected BlockingQueue<AssetRequest> m_assetRequests; | 43 | protected BlockingQueue<AssetRequest> m_assetRequests; |
42 | protected Thread m_localAssetServerThread; | 44 | protected Thread m_localAssetServerThread; |
@@ -68,15 +70,15 @@ namespace OpenSim.Framework.Communications.Cache | |||
68 | 70 | ||
69 | if (asset != null) | 71 | if (asset != null) |
70 | { | 72 | { |
71 | //MainLog.Instance.Verbose( | 73 | //m_log.Info( |
72 | // "ASSET", "Asset {0} received from asset server", req.AssetID); | 74 | // String.Format("[ASSET]: Asset {0} received from asset server", req.AssetID)); |
73 | 75 | ||
74 | m_receiver.AssetReceived(asset, req.IsTexture); | 76 | m_receiver.AssetReceived(asset, req.IsTexture); |
75 | } | 77 | } |
76 | else | 78 | else |
77 | { | 79 | { |
78 | MainLog.Instance.Error( | 80 | m_log.Error( |
79 | "ASSET", "Asset {0} not found by asset server", req.AssetID); | 81 | String.Format("[ASSET]: Asset {0} not found by asset server", req.AssetID)); |
80 | 82 | ||
81 | m_receiver.AssetNotFound(req.AssetID); | 83 | m_receiver.AssetNotFound(req.AssetID); |
82 | } | 84 | } |
@@ -84,7 +86,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
84 | 86 | ||
85 | public virtual void LoadDefaultAssets() | 87 | public virtual void LoadDefaultAssets() |
86 | { | 88 | { |
87 | MainLog.Instance.Verbose("ASSETSERVER", "Setting up asset database"); | 89 | m_log.Info("[ASSETSERVER]: Setting up asset database"); |
88 | 90 | ||
89 | assetLoader.ForEachDefaultXmlAsset(StoreAsset); | 91 | assetLoader.ForEachDefaultXmlAsset(StoreAsset); |
90 | 92 | ||
@@ -94,7 +96,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
94 | 96 | ||
95 | public AssetServerBase() | 97 | public AssetServerBase() |
96 | { | 98 | { |
97 | MainLog.Instance.Verbose("ASSETSERVER", "Starting asset storage system"); | 99 | m_log.Info("[ASSETSERVER]: Starting asset storage system"); |
98 | m_assetRequests = new BlockingQueue<AssetRequest>(); | 100 | m_assetRequests = new BlockingQueue<AssetRequest>(); |
99 | 101 | ||
100 | m_localAssetServerThread = new Thread(RunRequests); | 102 | m_localAssetServerThread = new Thread(RunRequests); |
@@ -114,7 +116,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
114 | } | 116 | } |
115 | catch (Exception e) | 117 | catch (Exception e) |
116 | { | 118 | { |
117 | MainLog.Instance.Error("ASSETSERVER", e.Message); | 119 | m_log.Error("[ASSETSERVER]: " + e.Message); |
118 | } | 120 | } |
119 | } | 121 | } |
120 | } | 122 | } |
@@ -131,7 +133,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
131 | req.IsTexture = isTexture; | 133 | req.IsTexture = isTexture; |
132 | m_assetRequests.Enqueue(req); | 134 | m_assetRequests.Enqueue(req); |
133 | 135 | ||
134 | MainLog.Instance.Verbose("ASSET", "Added {0} to request queue", assetID); | 136 | m_log.Info(String.Format("[ASSET]: Added {0} to request queue", assetID)); |
135 | } | 137 | } |
136 | 138 | ||
137 | public virtual void UpdateAsset(AssetBase asset) | 139 | public virtual void UpdateAsset(AssetBase asset) |