aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/AssetLoader/Filesystem
diff options
context:
space:
mode:
authorJeff Ames2008-02-05 19:44:27 +0000
committerJeff Ames2008-02-05 19:44:27 +0000
commit6ed5283bc06a62f38eb517e67b975832b603bf61 (patch)
treee5f635018789b73a99ddeca0883a68368fa5eece /OpenSim/Framework/AssetLoader/Filesystem
parentCut down on the number of packets sent during terraforming. Terraforming shou... (diff)
downloadopensim-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/AssetLoader/Filesystem')
-rw-r--r--OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs18
1 files changed, 9 insertions, 9 deletions
diff --git a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs
index 59db3d6..9026331 100644
--- a/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs
+++ b/OpenSim/Framework/AssetLoader/Filesystem/AssetLoaderFileSystem.cs
@@ -44,6 +44,8 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
44{ 44{
45 public class AssetLoaderFileSystem : IAssetLoader 45 public class AssetLoaderFileSystem : IAssetLoader
46 { 46 {
47 private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
48
47 protected AssetBase CreateAsset(string assetIdStr, string name, string path, bool isImage) 49 protected AssetBase CreateAsset(string assetIdStr, string name, string path, bool isImage)
48 { 50 {
49 AssetBase asset = new AssetBase( 51 AssetBase asset = new AssetBase(
@@ -53,13 +55,13 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
53 55
54 if (!String.IsNullOrEmpty(path)) 56 if (!String.IsNullOrEmpty(path))
55 { 57 {
56 MainLog.Instance.Verbose("ASSETS", "Loading: [{0}][{1}]", name, path); 58 m_log.Info(String.Format("[ASSETS]: Loading: [{0}][{1}]", name, path));
57 59
58 LoadAsset(asset, isImage, path); 60 LoadAsset(asset, isImage, path);
59 } 61 }
60 else 62 else
61 { 63 {
62 MainLog.Instance.Verbose("ASSETS", "Instantiated: [{0}]", name); 64 m_log.Info(String.Format("[ASSETS]: Instantiated: [{0}]", name));
63 } 65 }
64 66
65 return asset; 67 return asset;
@@ -106,14 +108,12 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
106 } 108 }
107 catch (XmlException e) 109 catch (XmlException e)
108 { 110 {
109 MainLog.Instance.Error("ASSETS", "Error loading {0} : {1}", assetSetPath, e); 111 m_log.Error(String.Format("[ASSETS]: Error loading {0} : {1}", assetSetPath, e));
110 } 112 }
111 } 113 }
112 else 114 else
113 { 115 {
114 MainLog.Instance.Error( 116 m_log.Error("[ASSETS]: Asset set control file assets/AssetSets.xml does not exist! No assets loaded.");
115 "ASSETS",
116 "Asset set control file assets/AssetSets.xml does not exist! No assets loaded.");
117 } 117 }
118 118
119 assets.ForEach(action); 119 assets.ForEach(action);
@@ -126,7 +126,7 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
126 /// <param name="assets"></param> 126 /// <param name="assets"></param>
127 protected void LoadXmlAssetSet(string assetSetPath, List<AssetBase> assets) 127 protected void LoadXmlAssetSet(string assetSetPath, List<AssetBase> assets)
128 { 128 {
129 MainLog.Instance.Verbose("ASSETS", "Loading asset set {0}", assetSetPath); 129 m_log.Info(String.Format("[ASSETS]: Loading asset set {0}", assetSetPath));
130 130
131 if (File.Exists(assetSetPath)) 131 if (File.Exists(assetSetPath))
132 { 132 {
@@ -152,12 +152,12 @@ namespace OpenSim.Framework.AssetLoader.Filesystem
152 } 152 }
153 catch (XmlException e) 153 catch (XmlException e)
154 { 154 {
155 MainLog.Instance.Error("ASSETS", "Error loading {0} : {1}", assetSetPath, e); 155 m_log.Error(String.Format("[ASSETS]: Error loading {0} : {1}", assetSetPath, e));
156 } 156 }
157 } 157 }
158 else 158 else
159 { 159 {
160 MainLog.Instance.Error("ASSETS", "Asset set file {0} does not exist!", assetSetPath); 160 m_log.Error(String.Format("[ASSETS]: Asset set file {0} does not exist!", assetSetPath));
161 } 161 }
162 } 162 }
163 } 163 }