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 | |
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.
173 files changed, 2173 insertions, 1948 deletions
diff --git a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs index 4c1c1d2..3cd918c 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/LoadRegionsPlugin.cs | |||
@@ -40,19 +40,21 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
40 | [Extension("/OpenSim/Startup")] | 40 | [Extension("/OpenSim/Startup")] |
41 | public class LoadRegionsPlugin : IApplicationPlugin | 41 | public class LoadRegionsPlugin : IApplicationPlugin |
42 | { | 42 | { |
43 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
44 | |||
43 | public void Initialise(OpenSimMain openSim) | 45 | public void Initialise(OpenSimMain openSim) |
44 | { | 46 | { |
45 | MainLog.Instance.Notice("LOADREGIONS", "Load Regions addin being initialised"); | 47 | m_log.Info("[LOADREGIONS]: Load Regions addin being initialised"); |
46 | 48 | ||
47 | IRegionLoader regionLoader; | 49 | IRegionLoader regionLoader; |
48 | if (openSim.ConfigSource.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem") | 50 | if (openSim.ConfigSource.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem") |
49 | { | 51 | { |
50 | MainLog.Instance.Notice("LOADREGIONS", "Loading Region Info from filesystem"); | 52 | m_log.Info("[LOADREGIONS]: Loading Region Info from filesystem"); |
51 | regionLoader = new RegionLoaderFileSystem(); | 53 | regionLoader = new RegionLoaderFileSystem(); |
52 | } | 54 | } |
53 | else | 55 | else |
54 | { | 56 | { |
55 | MainLog.Instance.Notice("LOADREGIONSPLUGIN", "Loading Region Info from web"); | 57 | m_log.Info("[LOADREGIONSPLUGIN]: Loading Region Info from web"); |
56 | regionLoader = new RegionLoaderWebServer(); | 58 | regionLoader = new RegionLoaderWebServer(); |
57 | } | 59 | } |
58 | 60 | ||
@@ -63,7 +65,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
63 | 65 | ||
64 | for (int i = 0; i < regionsToLoad.Length; i++) | 66 | for (int i = 0; i < regionsToLoad.Length; i++) |
65 | { | 67 | { |
66 | MainLog.Instance.Debug("LOADREGIONS", "Creating Region: " + regionsToLoad[i].RegionName + " (ThreadID: " + System.Threading.Thread.CurrentThread.ManagedThreadId.ToString() + ")"); | 68 | m_log.Debug("[LOADREGIONS]: Creating Region: " + regionsToLoad[i].RegionName + " (ThreadID: " + System.Threading.Thread.CurrentThread.ManagedThreadId.ToString() + ")"); |
67 | openSim.CreateRegion(regionsToLoad[i]); | 69 | openSim.CreateRegion(regionsToLoad[i]); |
68 | } | 70 | } |
69 | 71 | ||
@@ -73,17 +75,17 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
73 | 75 | ||
74 | public void LoadRegionFromConfig(OpenSimMain openSim, ulong regionhandle) | 76 | public void LoadRegionFromConfig(OpenSimMain openSim, ulong regionhandle) |
75 | { | 77 | { |
76 | MainLog.Instance.Notice("LOADREGIONS", "Load Regions addin being initialised"); | 78 | m_log.Info("[LOADREGIONS]: Load Regions addin being initialised"); |
77 | 79 | ||
78 | IRegionLoader regionLoader; | 80 | IRegionLoader regionLoader; |
79 | if (openSim.ConfigSource.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem") | 81 | if (openSim.ConfigSource.Configs["Startup"].GetString("region_info_source", "filesystem") == "filesystem") |
80 | { | 82 | { |
81 | MainLog.Instance.Notice("LOADREGIONS", "Loading Region Info from filesystem"); | 83 | m_log.Info("[LOADREGIONS]: Loading Region Info from filesystem"); |
82 | regionLoader = new RegionLoaderFileSystem(); | 84 | regionLoader = new RegionLoaderFileSystem(); |
83 | } | 85 | } |
84 | else | 86 | else |
85 | { | 87 | { |
86 | MainLog.Instance.Notice("LOADREGIONS", "Loading Region Info from web"); | 88 | m_log.Info("[LOADREGIONS]: Loading Region Info from web"); |
87 | regionLoader = new RegionLoaderWebServer(); | 89 | regionLoader = new RegionLoaderWebServer(); |
88 | } | 90 | } |
89 | 91 | ||
@@ -93,7 +95,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
93 | { | 95 | { |
94 | if (regionhandle == regionsToLoad[i].RegionHandle) | 96 | if (regionhandle == regionsToLoad[i].RegionHandle) |
95 | { | 97 | { |
96 | MainLog.Instance.Debug("LOADREGIONS", "Creating Region: " + regionsToLoad[i].RegionName + " (ThreadID: " + System.Threading.Thread.CurrentThread.ManagedThreadId.ToString() + ")"); | 98 | m_log.Debug("[LOADREGIONS]: Creating Region: " + regionsToLoad[i].RegionName + " (ThreadID: " + System.Threading.Thread.CurrentThread.ManagedThreadId.ToString() + ")"); |
97 | openSim.CreateRegion(regionsToLoad[i]); | 99 | openSim.CreateRegion(regionsToLoad[i]); |
98 | } | 100 | } |
99 | } | 101 | } |
diff --git a/OpenSim/ApplicationPlugins/LoadRegions/Properties/AssemblyInfo.cs b/OpenSim/ApplicationPlugins/LoadRegions/Properties/AssemblyInfo.cs index 638ed33..9476f17 100644 --- a/OpenSim/ApplicationPlugins/LoadRegions/Properties/AssemblyInfo.cs +++ b/OpenSim/ApplicationPlugins/LoadRegions/Properties/AssemblyInfo.cs | |||
@@ -64,4 +64,4 @@ using System.Runtime.InteropServices; | |||
64 | // [assembly: AssemblyVersion("1.0.*")] | 64 | // [assembly: AssemblyVersion("1.0.*")] |
65 | 65 | ||
66 | [assembly : AssemblyVersion("1.0.0.0")] | 66 | [assembly : AssemblyVersion("1.0.0.0")] |
67 | [assembly : AssemblyFileVersion("1.0.0.0")] \ No newline at end of file | 67 | [assembly : AssemblyFileVersion("1.0.0.0")] |
diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 770abe7..d80e478 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | |||
@@ -46,6 +46,8 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
46 | [Extension("/OpenSim/Startup")] | 46 | [Extension("/OpenSim/Startup")] |
47 | public class RemoteAdminPlugin : IApplicationPlugin | 47 | public class RemoteAdminPlugin : IApplicationPlugin |
48 | { | 48 | { |
49 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
50 | |||
49 | private OpenSimMain m_app; | 51 | private OpenSimMain m_app; |
50 | private BaseHttpServer m_httpd; | 52 | private BaseHttpServer m_httpd; |
51 | private string requiredPassword = String.Empty; | 53 | private string requiredPassword = String.Empty; |
@@ -56,7 +58,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
56 | { | 58 | { |
57 | if (openSim.ConfigSource.Configs["RemoteAdmin"].GetBoolean("enabled", false)) | 59 | if (openSim.ConfigSource.Configs["RemoteAdmin"].GetBoolean("enabled", false)) |
58 | { | 60 | { |
59 | MainLog.Instance.Verbose("RADMIN", "Remote Admin Plugin Enabled"); | 61 | m_log.Info("[RADMIN]: Remote Admin Plugin Enabled"); |
60 | requiredPassword = openSim.ConfigSource.Configs["RemoteAdmin"].GetString("access_password", String.Empty); | 62 | requiredPassword = openSim.ConfigSource.Configs["RemoteAdmin"].GetString("access_password", String.Empty); |
61 | 63 | ||
62 | m_app = openSim; | 64 | m_app = openSim; |
@@ -126,7 +128,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
126 | else | 128 | else |
127 | { | 129 | { |
128 | string message = (string) requestData["message"]; | 130 | string message = (string) requestData["message"]; |
129 | MainLog.Instance.Verbose("RADMIN", "Broadcasting: " + message); | 131 | m_log.Info("[RADMIN]: Broadcasting: " + message); |
130 | 132 | ||
131 | responseData["accepted"] = "true"; | 133 | responseData["accepted"] = "true"; |
132 | response.Value = responseData; | 134 | response.Value = responseData; |
@@ -153,7 +155,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
153 | { | 155 | { |
154 | string file = (string)requestData["filename"]; | 156 | string file = (string)requestData["filename"]; |
155 | LLUUID regionID = LLUUID.Parse((string)requestData["regionid"]); | 157 | LLUUID regionID = LLUUID.Parse((string)requestData["regionid"]); |
156 | MainLog.Instance.Verbose("RADMIN", "Terrain Loading: " + file); | 158 | m_log.Info("[RADMIN]: Terrain Loading: " + file); |
157 | 159 | ||
158 | responseData["accepted"] = "true"; | 160 | responseData["accepted"] = "true"; |
159 | 161 | ||
@@ -177,7 +179,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
177 | 179 | ||
178 | public XmlRpcResponse XmlRpcShutdownMethod(XmlRpcRequest request) | 180 | public XmlRpcResponse XmlRpcShutdownMethod(XmlRpcRequest request) |
179 | { | 181 | { |
180 | MainLog.Instance.Verbose("RADMIN", "Received Shutdown Administrator Request"); | 182 | m_log.Info("[RADMIN]: Received Shutdown Administrator Request"); |
181 | XmlRpcResponse response = new XmlRpcResponse(); | 183 | XmlRpcResponse response = new XmlRpcResponse(); |
182 | Hashtable requestData = (Hashtable) request.Params[0]; | 184 | Hashtable requestData = (Hashtable) request.Params[0]; |
183 | Hashtable responseData = new Hashtable(); | 185 | Hashtable responseData = new Hashtable(); |
@@ -233,7 +235,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
233 | 235 | ||
234 | public XmlRpcResponse XmlRpcCreateRegionMethod(XmlRpcRequest request) | 236 | public XmlRpcResponse XmlRpcCreateRegionMethod(XmlRpcRequest request) |
235 | { | 237 | { |
236 | MainLog.Instance.Verbose("RADMIN", "Received Create Region Administrator Request"); | 238 | m_log.Info("[RADMIN]: Received Create Region Administrator Request"); |
237 | XmlRpcResponse response = new XmlRpcResponse(); | 239 | XmlRpcResponse response = new XmlRpcResponse(); |
238 | Hashtable requestData = (Hashtable) request.Params[0]; | 240 | Hashtable requestData = (Hashtable) request.Params[0]; |
239 | Hashtable responseData = new Hashtable(); | 241 | Hashtable responseData = new Hashtable(); |
@@ -284,7 +286,7 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
284 | 286 | ||
285 | public XmlRpcResponse XmlRpcCreateUserMethod(XmlRpcRequest request) | 287 | public XmlRpcResponse XmlRpcCreateUserMethod(XmlRpcRequest request) |
286 | { | 288 | { |
287 | MainLog.Instance.Verbose("RADMIN", "Received Create User Administrator Request"); | 289 | m_log.Info("[RADMIN]: Received Create User Administrator Request"); |
288 | XmlRpcResponse response = new XmlRpcResponse(); | 290 | XmlRpcResponse response = new XmlRpcResponse(); |
289 | Hashtable requestData = (Hashtable) request.Params[0]; | 291 | Hashtable requestData = (Hashtable) request.Params[0]; |
290 | Hashtable responseData = new Hashtable(); | 292 | Hashtable responseData = new Hashtable(); |
@@ -312,14 +314,14 @@ namespace OpenSim.ApplicationPlugins.LoadRegions | |||
312 | responseData["error"] = "Error creating user"; | 314 | responseData["error"] = "Error creating user"; |
313 | responseData["avatar_uuid"] = LLUUID.Zero; | 315 | responseData["avatar_uuid"] = LLUUID.Zero; |
314 | response.Value = responseData; | 316 | response.Value = responseData; |
315 | MainLog.Instance.Error("RADMIN", "Error creating user (" + tempfirstname + " " + templastname + ") :"); | 317 | m_log.Error("[RADMIN]: Error creating user (" + tempfirstname + " " + templastname + ") :"); |
316 | } | 318 | } |
317 | else | 319 | else |
318 | { | 320 | { |
319 | responseData["created"] = "true"; | 321 | responseData["created"] = "true"; |
320 | responseData["avatar_uuid"] = tempuserID; | 322 | responseData["avatar_uuid"] = tempuserID; |
321 | response.Value = responseData; | 323 | response.Value = responseData; |
322 | MainLog.Instance.Verbose("RADMIN", "User " + tempfirstname + " " + templastname + " created. Userid " + tempuserID + " assigned."); | 324 | m_log.Info("[RADMIN]: User " + tempfirstname + " " + templastname + " created. Userid " + tempuserID + " assigned."); |
323 | } | 325 | } |
324 | } | 326 | } |
325 | catch (Exception e) | 327 | catch (Exception e) |
diff --git a/OpenSim/Framework/AssemblyInfo.cs b/OpenSim/Framework/AssemblyInfo.cs index 1507d67..60c9024 100644 --- a/OpenSim/Framework/AssemblyInfo.cs +++ b/OpenSim/Framework/AssemblyInfo.cs | |||
@@ -61,4 +61,4 @@ using System.Runtime.InteropServices; | |||
61 | // | 61 | // |
62 | 62 | ||
63 | [assembly : AssemblyVersion("1.0.0.0")] | 63 | [assembly : AssemblyVersion("1.0.0.0")] |
64 | [assembly : AssemblyFileVersion("1.0.0.0")] \ No newline at end of file | 64 | [assembly : AssemblyFileVersion("1.0.0.0")] |
diff --git a/OpenSim/Framework/AssetConfig.cs b/OpenSim/Framework/AssetConfig.cs index 9989bfd..a83981a 100644 --- a/OpenSim/Framework/AssetConfig.cs +++ b/OpenSim/Framework/AssetConfig.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | using OpenSim.Framework.Console; | ||
30 | 31 | ||
31 | namespace OpenSim.Framework | 32 | namespace OpenSim.Framework |
32 | { | 33 | { |
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 | } |
diff --git a/OpenSim/Framework/ClientManager.cs b/OpenSim/Framework/ClientManager.cs index de7708c..8422c17 100644 --- a/OpenSim/Framework/ClientManager.cs +++ b/OpenSim/Framework/ClientManager.cs | |||
@@ -36,11 +36,12 @@ namespace OpenSim.Framework | |||
36 | 36 | ||
37 | public class ClientManager | 37 | public class ClientManager |
38 | { | 38 | { |
39 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
40 | |||
39 | private Dictionary<uint, IClientAPI> m_clients; | 41 | private Dictionary<uint, IClientAPI> m_clients; |
40 | 42 | ||
41 | public void ForEachClient(ForEachClientDelegate whatToDo) | 43 | public void ForEachClient(ForEachClientDelegate whatToDo) |
42 | { | 44 | { |
43 | |||
44 | // Wasteful, I know | 45 | // Wasteful, I know |
45 | IClientAPI[] LocalClients = new IClientAPI[0]; | 46 | IClientAPI[] LocalClients = new IClientAPI[0]; |
46 | lock (m_clients) | 47 | lock (m_clients) |
@@ -57,7 +58,7 @@ namespace OpenSim.Framework | |||
57 | } | 58 | } |
58 | catch (System.Exception e) | 59 | catch (System.Exception e) |
59 | { | 60 | { |
60 | OpenSim.Framework.Console.MainLog.Instance.Warn("CLIENT", "Unable to do ForEachClient for one of the clients" + "\n Reason: " + e.ToString()); | 61 | m_log.Warn("[CLIENT]: Unable to do ForEachClient for one of the clients" + "\n Reason: " + e.ToString()); |
61 | } | 62 | } |
62 | } | 63 | } |
63 | } | 64 | } |
@@ -116,11 +117,9 @@ namespace OpenSim.Framework | |||
116 | } | 117 | } |
117 | catch (System.Exception e) | 118 | catch (System.Exception e) |
118 | { | 119 | { |
119 | OpenSim.Framework.Console.MainLog.Instance.Error("CLIENT", string.Format("Unable to shutdown circuit for: {0}\n Reason: {1}", agentId, e)); | 120 | m_log.Error(string.Format("[CLIENT]: Unable to shutdown circuit for: {0}\n Reason: {1}", agentId, e)); |
120 | } | 121 | } |
121 | } | 122 | } |
122 | |||
123 | |||
124 | } | 123 | } |
125 | 124 | ||
126 | private uint[] GetAllCircuits(LLUUID agentId) | 125 | private uint[] GetAllCircuits(LLUUID agentId) |
@@ -134,7 +133,6 @@ namespace OpenSim.Framework | |||
134 | m_clients.Values.CopyTo(LocalClients, 0); | 133 | m_clients.Values.CopyTo(LocalClients, 0); |
135 | } | 134 | } |
136 | 135 | ||
137 | |||
138 | for (int i = 0; i < LocalClients.Length; i++ ) | 136 | for (int i = 0; i < LocalClients.Length; i++ ) |
139 | { | 137 | { |
140 | if (LocalClients[i].AgentId == agentId) | 138 | if (LocalClients[i].AgentId == agentId) |
@@ -160,7 +158,6 @@ namespace OpenSim.Framework | |||
160 | m_clients.Values.CopyTo(LocalClients, 0); | 158 | m_clients.Values.CopyTo(LocalClients, 0); |
161 | } | 159 | } |
162 | 160 | ||
163 | |||
164 | for (int i = 0; i < LocalClients.Length; i++) | 161 | for (int i = 0; i < LocalClients.Length; i++) |
165 | { | 162 | { |
166 | if (LocalClients[i].AgentId != sender.AgentId) | 163 | if (LocalClients[i].AgentId != sender.AgentId) |
diff --git a/OpenSim/Framework/Communications/Cache/AssetCache.cs b/OpenSim/Framework/Communications/Cache/AssetCache.cs index db2d2fe..84713b9 100644 --- a/OpenSim/Framework/Communications/Cache/AssetCache.cs +++ b/OpenSim/Framework/Communications/Cache/AssetCache.cs | |||
@@ -44,6 +44,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
44 | /// </summary> | 44 | /// </summary> |
45 | public class AssetCache : IAssetReceiver | 45 | public class AssetCache : IAssetReceiver |
46 | { | 46 | { |
47 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
48 | |||
47 | public Dictionary<LLUUID, AssetInfo> Assets; | 49 | public Dictionary<LLUUID, AssetInfo> Assets; |
48 | public Dictionary<LLUUID, TextureImage> Textures; | 50 | public Dictionary<LLUUID, TextureImage> Textures; |
49 | 51 | ||
@@ -61,14 +63,13 @@ namespace OpenSim.Framework.Communications.Cache | |||
61 | private readonly IAssetServer m_assetServer; | 63 | private readonly IAssetServer m_assetServer; |
62 | 64 | ||
63 | private readonly Thread m_assetCacheThread; | 65 | private readonly Thread m_assetCacheThread; |
64 | private readonly LogBase m_log; | ||
65 | 66 | ||
66 | /// <summary> | 67 | /// <summary> |
67 | /// | 68 | /// |
68 | /// </summary> | 69 | /// </summary> |
69 | public AssetCache(IAssetServer assetServer, LogBase log) | 70 | public AssetCache(IAssetServer assetServer) |
70 | { | 71 | { |
71 | log.Verbose("ASSETSTORAGE", "Creating Asset cache"); | 72 | m_log.Info("[ASSETSTORAGE]: Creating Asset cache"); |
72 | m_assetServer = assetServer; | 73 | m_assetServer = assetServer; |
73 | m_assetServer.SetReceiver(this); | 74 | m_assetServer.SetReceiver(this); |
74 | Assets = new Dictionary<LLUUID, AssetInfo>(); | 75 | Assets = new Dictionary<LLUUID, AssetInfo>(); |
@@ -76,8 +77,6 @@ namespace OpenSim.Framework.Communications.Cache | |||
76 | m_assetCacheThread = new Thread(new ThreadStart(RunAssetManager)); | 77 | m_assetCacheThread = new Thread(new ThreadStart(RunAssetManager)); |
77 | m_assetCacheThread.IsBackground = true; | 78 | m_assetCacheThread.IsBackground = true; |
78 | m_assetCacheThread.Start(); | 79 | m_assetCacheThread.Start(); |
79 | |||
80 | m_log = log; | ||
81 | } | 80 | } |
82 | 81 | ||
83 | /// <summary> | 82 | /// <summary> |
@@ -94,7 +93,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
94 | } | 93 | } |
95 | catch (Exception e) | 94 | catch (Exception e) |
96 | { | 95 | { |
97 | m_log.Error("ASSETCACHE", e.ToString()); | 96 | m_log.Error("[ASSETCACHE]: " + e.ToString()); |
98 | } | 97 | } |
99 | } | 98 | } |
100 | } | 99 | } |
@@ -198,8 +197,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
198 | } | 197 | } |
199 | } while (--maxPolls > 0); | 198 | } while (--maxPolls > 0); |
200 | 199 | ||
201 | MainLog.Instance.Warn( | 200 | m_log.Warn( |
202 | "ASSETCACHE", "Asset {0} was not received before the retrieval timeout was reached"); | 201 | String.Format("[ASSETCACHE]: Asset {0} was not received before the retrieval timeout was reached")); |
203 | 202 | ||
204 | return null; | 203 | return null; |
205 | } | 204 | } |
@@ -266,7 +265,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
266 | } | 265 | } |
267 | } | 266 | } |
268 | 267 | ||
269 | m_log.Verbose("ASSETCACHE", "Adding {0} {1} [{2}]: {3}.", temporary, type, asset.FullID, result); | 268 | m_log.Info(String.Format("[ASSETCACHE]: Adding {0} {1} [{2}]: {3}.", temporary, type, asset.FullID, result)); |
270 | } | 269 | } |
271 | 270 | ||
272 | public void DeleteAsset(LLUUID assetID) | 271 | public void DeleteAsset(LLUUID assetID) |
@@ -362,7 +361,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
362 | { | 361 | { |
363 | //if (this.RequestedTextures.ContainsKey(assetID)) | 362 | //if (this.RequestedTextures.ContainsKey(assetID)) |
364 | //{ | 363 | //{ |
365 | // MainLog.Instance.Warn("ASSET CACHE", "sending image not found for {0}", assetID); | 364 | // m_log.Warn(String.Format("[ASSET CACHE]: sending image not found for {0}", assetID)); |
366 | // AssetRequest req = this.RequestedTextures[assetID]; | 365 | // AssetRequest req = this.RequestedTextures[assetID]; |
367 | // ImageNotInDatabasePacket notFound = new ImageNotInDatabasePacket(); | 366 | // ImageNotInDatabasePacket notFound = new ImageNotInDatabasePacket(); |
368 | // notFound.ImageID.ID = assetID; | 367 | // notFound.ImageID.ID = assetID; |
@@ -371,7 +370,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
371 | //} | 370 | //} |
372 | //else | 371 | //else |
373 | //{ | 372 | //{ |
374 | // MainLog.Instance.Error("ASSET CACHE", "Cound not send image not found for {0}", assetID); | 373 | // m_log.Error(String.Format("[ASSET CACHE]: Cound not send image not found for {0}", assetID)); |
375 | //} | 374 | //} |
376 | } | 375 | } |
377 | 376 | ||
diff --git a/OpenSim/Framework/Communications/Cache/AssetServer.cs b/OpenSim/Framework/Communications/Cache/AssetServer.cs index 575e80a..c1cf100 100644 --- a/OpenSim/Framework/Communications/Cache/AssetServer.cs +++ b/OpenSim/Framework/Communications/Cache/AssetServer.cs | |||
@@ -35,6 +35,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
35 | { | 35 | { |
36 | public class LocalAssetServer : AssetServerBase | 36 | public class LocalAssetServer : AssetServerBase |
37 | { | 37 | { |
38 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
39 | |||
38 | private IObjectContainer db; | 40 | private IObjectContainer db; |
39 | 41 | ||
40 | public LocalAssetServer() | 42 | public LocalAssetServer() |
@@ -43,7 +45,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
43 | yapfile = File.Exists(Path.Combine(Util.dataDir(), "regionassets.yap")); | 45 | yapfile = File.Exists(Path.Combine(Util.dataDir(), "regionassets.yap")); |
44 | 46 | ||
45 | db = Db4oFactory.OpenFile(Path.Combine(Util.dataDir(), "regionassets.yap")); | 47 | db = Db4oFactory.OpenFile(Path.Combine(Util.dataDir(), "regionassets.yap")); |
46 | MainLog.Instance.Verbose("ASSETS", "Db4 Asset database creation"); | 48 | m_log.Info("[ASSETS]: Db4 Asset database creation"); |
47 | 49 | ||
48 | if (!yapfile) | 50 | if (!yapfile) |
49 | { | 51 | { |
@@ -67,7 +69,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
67 | 69 | ||
68 | if (db != null) | 70 | if (db != null) |
69 | { | 71 | { |
70 | MainLog.Instance.Verbose("ASSETSERVER", "Closing local asset server database"); | 72 | m_log.Info("[ASSETSERVER]: Closing local asset server database"); |
71 | db.Close(); | 73 | db.Close(); |
72 | } | 74 | } |
73 | } | 75 | } |
@@ -120,7 +122,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
120 | 122 | ||
121 | protected virtual void SetUpAssetDatabase() | 123 | protected virtual void SetUpAssetDatabase() |
122 | { | 124 | { |
123 | MainLog.Instance.Verbose("LOCAL ASSET SERVER", "Setting up asset database"); | 125 | m_log.Info("[LOCAL ASSET SERVER]: Setting up asset database"); |
124 | 126 | ||
125 | base.LoadDefaultAssets(); | 127 | base.LoadDefaultAssets(); |
126 | } | 128 | } |
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) |
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 | ||
diff --git a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs index ae07898..46767bb 100644 --- a/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs +++ b/OpenSim/Framework/Communications/Cache/LibraryRootFolder.cs | |||
@@ -26,12 +26,12 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | ||
29 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
30 | using System.IO; | 31 | using System.IO; |
31 | using System.Xml; | 32 | using System.Xml; |
32 | using libsecondlife; | 33 | using libsecondlife; |
33 | using Nini.Config; | 34 | using Nini.Config; |
34 | |||
35 | using OpenSim.Framework.Console; | 35 | using OpenSim.Framework.Console; |
36 | 36 | ||
37 | namespace OpenSim.Framework.Communications.Cache | 37 | namespace OpenSim.Framework.Communications.Cache |
@@ -42,6 +42,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
42 | /// </summary> | 42 | /// </summary> |
43 | public class LibraryRootFolder : InventoryFolderImpl | 43 | public class LibraryRootFolder : InventoryFolderImpl |
44 | { | 44 | { |
45 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | |||
45 | private LLUUID libOwner = new LLUUID("11111111-1111-0000-0000-000100bba000"); | 47 | private LLUUID libOwner = new LLUUID("11111111-1111-0000-0000-000100bba000"); |
46 | 48 | ||
47 | /// <summary> | 49 | /// <summary> |
@@ -53,7 +55,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
53 | 55 | ||
54 | public LibraryRootFolder() | 56 | public LibraryRootFolder() |
55 | { | 57 | { |
56 | MainLog.Instance.Verbose("LIBRARYINVENTORY", "Loading library inventory"); | 58 | m_log.Info("[LIBRARYINVENTORY]: Loading library inventory"); |
57 | 59 | ||
58 | agentID = libOwner; | 60 | agentID = libOwner; |
59 | folderID = new LLUUID("00000112-000f-0000-0000-000100bba000"); | 61 | folderID = new LLUUID("00000112-000f-0000-0000-000100bba000"); |
@@ -138,8 +140,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
138 | /// <param name="assets"></param> | 140 | /// <param name="assets"></param> |
139 | protected void LoadLibraries(string librariesControlPath) | 141 | protected void LoadLibraries(string librariesControlPath) |
140 | { | 142 | { |
141 | MainLog.Instance.Verbose( | 143 | m_log.Info( |
142 | "LIBRARYINVENTORY", "Loading libraries control file {0}", librariesControlPath); | 144 | String.Format("LIBRARYINVENTORY", "Loading libraries control file {0}", librariesControlPath)); |
143 | 145 | ||
144 | LoadFromFile(librariesControlPath, "Libraries control", ReadLibraryFromConfig); | 146 | LoadFromFile(librariesControlPath, "Libraries control", ReadLibraryFromConfig); |
145 | } | 147 | } |
@@ -186,15 +188,15 @@ namespace OpenSim.Framework.Communications.Cache | |||
186 | libraryFolders.Add(folderInfo.folderID, folderInfo); | 188 | libraryFolders.Add(folderInfo.folderID, folderInfo); |
187 | parentFolder.SubFolders.Add(folderInfo.folderID, folderInfo); | 189 | parentFolder.SubFolders.Add(folderInfo.folderID, folderInfo); |
188 | 190 | ||
189 | // MainLog.Instance.Verbose( | 191 | // m_log.Info( |
190 | // "LIBRARYINVENTORY", "Adding folder {0} ({1})", folderInfo.name, folderInfo.folderID); | 192 | // String.Format("[LIBRARYINVENTORY]: Adding folder {0} ({1})", folderInfo.name, folderInfo.folderID)); |
191 | } | 193 | } |
192 | else | 194 | else |
193 | { | 195 | { |
194 | MainLog.Instance.Warn( | 196 | m_log.Warn( |
195 | "LIBRARYINVENTORY", | 197 | String.Format("[LIBRARYINVENTORY]: " + |
196 | "Couldn't add folder {0} ({1}) since parent folder with ID {2} does not exist!", | 198 | "Couldn't add folder {0} ({1}) since parent folder with ID {2} does not exist!", |
197 | folderInfo.name, folderInfo.folderID, folderInfo.parentID); | 199 | folderInfo.name, folderInfo.folderID, folderInfo.parentID)); |
198 | } | 200 | } |
199 | } | 201 | } |
200 | 202 | ||
@@ -227,10 +229,10 @@ namespace OpenSim.Framework.Communications.Cache | |||
227 | } | 229 | } |
228 | else | 230 | else |
229 | { | 231 | { |
230 | MainLog.Instance.Warn( | 232 | m_log.Warn( |
231 | "LIBRARYINVENTORY", | 233 | String.Format("[LIBRARYINVENTORY]: " + |
232 | "Couldn't add item {0} ({1}) since parent folder with ID {2} does not exist!", | 234 | "Couldn't add item {0} ({1}) since parent folder with ID {2} does not exist!", |
233 | item.inventoryName, item.inventoryID, item.parentFolderID); | 235 | item.inventoryName, item.inventoryID, item.parentFolderID)); |
234 | } | 236 | } |
235 | } | 237 | } |
236 | 238 | ||
@@ -257,14 +259,14 @@ namespace OpenSim.Framework.Communications.Cache | |||
257 | } | 259 | } |
258 | catch (XmlException e) | 260 | catch (XmlException e) |
259 | { | 261 | { |
260 | MainLog.Instance.Error( | 262 | m_log.Error( |
261 | "LIBRARYINVENTORY", "Error loading {0} : {1}", path, e); | 263 | String.Format("[LIBRARYINVENTORY]: Error loading {0} : {1}", path, e)); |
262 | } | 264 | } |
263 | } | 265 | } |
264 | else | 266 | else |
265 | { | 267 | { |
266 | MainLog.Instance.Error( | 268 | m_log.Error( |
267 | "LIBRARYINVENTORY", "{0} file {1} does not exist!", fileDescription, path); | 269 | String.Format("[LIBRARYINVENTORY]: {0} file {1} does not exist!", fileDescription, path)); |
268 | } | 270 | } |
269 | } | 271 | } |
270 | 272 | ||
diff --git a/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs b/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs index 0a141c3..d3a283a 100644 --- a/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs +++ b/OpenSim/Framework/Communications/Cache/SQLAssetServer.cs | |||
@@ -33,6 +33,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
33 | { | 33 | { |
34 | public class SQLAssetServer : AssetServerBase | 34 | public class SQLAssetServer : AssetServerBase |
35 | { | 35 | { |
36 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
37 | |||
36 | public SQLAssetServer(string pluginName) | 38 | public SQLAssetServer(string pluginName) |
37 | { | 39 | { |
38 | AddPlugin(pluginName); | 40 | AddPlugin(pluginName); |
@@ -45,7 +47,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
45 | 47 | ||
46 | public void AddPlugin(string FileName) | 48 | public void AddPlugin(string FileName) |
47 | { | 49 | { |
48 | MainLog.Instance.Verbose("SQLAssetServer", "AssetStorage: Attempting to load " + FileName); | 50 | m_log.Info("[SQLAssetServer]: AssetStorage: Attempting to load " + FileName); |
49 | Assembly pluginAssembly = Assembly.LoadFrom(FileName); | 51 | Assembly pluginAssembly = Assembly.LoadFrom(FileName); |
50 | 52 | ||
51 | foreach (Type pluginType in pluginAssembly.GetTypes()) | 53 | foreach (Type pluginType in pluginAssembly.GetTypes()) |
@@ -61,15 +63,14 @@ namespace OpenSim.Framework.Communications.Cache | |||
61 | m_assetProvider = plug; | 63 | m_assetProvider = plug; |
62 | m_assetProvider.Initialise(); | 64 | m_assetProvider.Initialise(); |
63 | 65 | ||
64 | MainLog.Instance.Verbose("AssetStorage", | 66 | m_log.Info("[AssetStorage]: " + |
65 | "Added " + m_assetProvider.Name + " " + | 67 | "Added " + m_assetProvider.Name + " " + |
66 | m_assetProvider.Version); | 68 | m_assetProvider.Version); |
67 | } | 69 | } |
68 | } | 70 | } |
69 | } | 71 | } |
70 | } | 72 | } |
71 | 73 | ||
72 | |||
73 | public override void Close() | 74 | public override void Close() |
74 | { | 75 | { |
75 | base.Close(); | 76 | base.Close(); |
@@ -98,4 +99,4 @@ namespace OpenSim.Framework.Communications.Cache | |||
98 | m_assetProvider.CommitAssets(); | 99 | m_assetProvider.CommitAssets(); |
99 | } | 100 | } |
100 | } | 101 | } |
101 | } \ No newline at end of file | 102 | } |
diff --git a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs index 14670fd..79c0c86 100644 --- a/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs +++ b/OpenSim/Framework/Communications/Cache/UserProfileCacheService.cs | |||
@@ -25,6 +25,8 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | |||
29 | using System; | ||
28 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
29 | using libsecondlife; | 31 | using libsecondlife; |
30 | using OpenSim.Framework.Console; | 32 | using OpenSim.Framework.Console; |
@@ -33,6 +35,8 @@ namespace OpenSim.Framework.Communications.Cache | |||
33 | { | 35 | { |
34 | public class UserProfileCacheService | 36 | public class UserProfileCacheService |
35 | { | 37 | { |
38 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
39 | |||
36 | // Fields | 40 | // Fields |
37 | private readonly CommunicationsManager m_parent; | 41 | private readonly CommunicationsManager m_parent; |
38 | private readonly Dictionary<LLUUID, CachedUserInfo> m_userProfiles = new Dictionary<LLUUID, CachedUserInfo>(); | 42 | private readonly Dictionary<LLUUID, CachedUserInfo> m_userProfiles = new Dictionary<LLUUID, CachedUserInfo>(); |
@@ -69,7 +73,7 @@ namespace OpenSim.Framework.Communications.Cache | |||
69 | } | 73 | } |
70 | else | 74 | else |
71 | { | 75 | { |
72 | MainLog.Instance.Error("USERCACHE", "User profile for user {0} not found", userID); | 76 | m_log.Error(String.Format("[USERCACHE]: User profile for user {0} not found", userID)); |
73 | } | 77 | } |
74 | } | 78 | } |
75 | } | 79 | } |
@@ -229,28 +233,28 @@ namespace OpenSim.Framework.Communications.Cache | |||
229 | } | 233 | } |
230 | else | 234 | else |
231 | { | 235 | { |
232 | MainLog.Instance.Error( | 236 | m_log.Error( |
233 | "INVENTORYCACHE", "Could not find root folder for user {0}", remoteClient.Name); | 237 | String.Format("[INVENTORYCACHE]: Could not find root folder for user {0}", remoteClient.Name)); |
234 | 238 | ||
235 | return; | 239 | return; |
236 | } | 240 | } |
237 | } | 241 | } |
238 | else | 242 | else |
239 | { | 243 | { |
240 | MainLog.Instance.Error( | 244 | m_log.Error( |
241 | "INVENTORYCACHE", | 245 | String.Format("[INVENTORYCACHE]: " + |
242 | "Could not find user profile for {0} for folder {1}", | 246 | "Could not find user profile for {0} for folder {1}", |
243 | remoteClient.Name, folderID); | 247 | remoteClient.Name, folderID)); |
244 | 248 | ||
245 | return; | 249 | return; |
246 | } | 250 | } |
247 | 251 | ||
248 | // If we've reached this point then we couldn't find the folder, even though the client thinks | 252 | // If we've reached this point then we couldn't find the folder, even though the client thinks |
249 | // it exists | 253 | // it exists |
250 | MainLog.Instance.Error( | 254 | m_log.Error( |
251 | "INVENTORYCACHE", | 255 | String.Format("[INVENTORYCACHE]: " + |
252 | "Could not find folder {0} for user {1}", | 256 | "Could not find folder {0} for user {1}", |
253 | folderID, remoteClient.Name); | 257 | folderID, remoteClient.Name)); |
254 | } | 258 | } |
255 | 259 | ||
256 | public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, LLUUID folderID) | 260 | public void HandlePurgeInventoryDescendents(IClientAPI remoteClient, LLUUID folderID) |
diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index f85b4ab..6473c26 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs | |||
@@ -54,6 +54,8 @@ namespace OpenSim.Region.Capabilities | |||
54 | 54 | ||
55 | public class Caps | 55 | public class Caps |
56 | { | 56 | { |
57 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
58 | |||
57 | private string m_httpListenerHostName; | 59 | private string m_httpListenerHostName; |
58 | private uint m_httpListenPort; | 60 | private uint m_httpListenPort; |
59 | 61 | ||
@@ -96,7 +98,7 @@ namespace OpenSim.Region.Capabilities | |||
96 | /// </summary> | 98 | /// </summary> |
97 | public void RegisterHandlers() | 99 | public void RegisterHandlers() |
98 | { | 100 | { |
99 | MainLog.Instance.Verbose("CAPS", "Registering CAPS handlers"); | 101 | m_log.Info("[CAPS]: Registering CAPS handlers"); |
100 | string capsBase = "/CAPS/" + m_capsObjectPath; | 102 | string capsBase = "/CAPS/" + m_capsObjectPath; |
101 | try | 103 | try |
102 | { | 104 | { |
@@ -115,7 +117,7 @@ namespace OpenSim.Region.Capabilities | |||
115 | } | 117 | } |
116 | catch (Exception e) | 118 | catch (Exception e) |
117 | { | 119 | { |
118 | MainLog.Instance.Error("CAPS", e.ToString()); | 120 | m_log.Error("[CAPS]: " + e.ToString()); |
119 | } | 121 | } |
120 | } | 122 | } |
121 | 123 | ||
@@ -275,7 +277,7 @@ namespace OpenSim.Region.Capabilities | |||
275 | { | 277 | { |
276 | try | 278 | try |
277 | { | 279 | { |
278 | // MainLog.Instance.Debug("CAPS", "request: {0}, path: {1}, param: {2}", request, path, param); | 280 | // m_log.Debug(String.Format("[CAPS]: request: {0}, path: {1}, param: {2}", request, path, param)); |
279 | 281 | ||
280 | Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Helpers.StringToField(request)); | 282 | Hashtable hash = (Hashtable) LLSD.LLSDDeserialize(Helpers.StringToField(request)); |
281 | LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate(); | 283 | LLSDTaskScriptUpdate llsdUpdateRequest = new LLSDTaskScriptUpdate(); |
@@ -303,16 +305,16 @@ namespace OpenSim.Region.Capabilities | |||
303 | uploadResponse.uploader = uploaderURL; | 305 | uploadResponse.uploader = uploaderURL; |
304 | uploadResponse.state = "upload"; | 306 | uploadResponse.state = "upload"; |
305 | 307 | ||
306 | // MainLog.Instance.Verbose( | 308 | // m_log.Info( |
307 | // "CAPS", | 309 | // String.Format("[CAPS]: " + |
308 | // "ScriptTaskInventory response: {0}", | 310 | // "ScriptTaskInventory response: {0}", |
309 | // LLSDHelpers.SerialiseLLSDReply(uploadResponse)); | 311 | // LLSDHelpers.SerialiseLLSDReply(uploadResponse))); |
310 | 312 | ||
311 | return LLSDHelpers.SerialiseLLSDReply(uploadResponse); | 313 | return LLSDHelpers.SerialiseLLSDReply(uploadResponse); |
312 | } | 314 | } |
313 | catch (Exception e) | 315 | catch (Exception e) |
314 | { | 316 | { |
315 | MainLog.Instance.Error("CAPS", e.ToString()); | 317 | m_log.Error("[CAPS]: " + e.ToString()); |
316 | } | 318 | } |
317 | 319 | ||
318 | return null; | 320 | return null; |
@@ -349,10 +351,10 @@ namespace OpenSim.Region.Capabilities | |||
349 | uploadResponse.uploader = uploaderURL; | 351 | uploadResponse.uploader = uploaderURL; |
350 | uploadResponse.state = "upload"; | 352 | uploadResponse.state = "upload"; |
351 | 353 | ||
352 | // MainLog.Instance.Verbose( | 354 | // m_log.Info( |
353 | // "CAPS", | 355 | // String.Format("[CAPS]: " + |
354 | // "NoteCardAgentInventory response: {0}", | 356 | // "NoteCardAgentInventory response: {0}", |
355 | // LLSDHelpers.SerialiseLLSDReply(uploadResponse)); | 357 | // LLSDHelpers.SerialiseLLSDReply(uploadResponse))); |
356 | 358 | ||
357 | return LLSDHelpers.SerialiseLLSDReply(uploadResponse); | 359 | return LLSDHelpers.SerialiseLLSDReply(uploadResponse); |
358 | } | 360 | } |
@@ -681,10 +683,10 @@ namespace OpenSim.Region.Capabilities | |||
681 | { | 683 | { |
682 | try | 684 | try |
683 | { | 685 | { |
684 | // MainLog.Instance.Verbose( | 686 | // m_log.Info( |
685 | // "CAPS", | 687 | // String.Format("[CAPS]: " + |
686 | // "TaskInventoryScriptUpdater received data: {0}, path: {1}, param: {2}", | 688 | // "TaskInventoryScriptUpdater received data: {0}, path: {1}, param: {2}", |
687 | // data, path, param); | 689 | // data, path, param)); |
688 | 690 | ||
689 | string res = String.Empty; | 691 | string res = String.Empty; |
690 | LLSDTaskInventoryUploadComplete uploadComplete = new LLSDTaskInventoryUploadComplete(); | 692 | LLSDTaskInventoryUploadComplete uploadComplete = new LLSDTaskInventoryUploadComplete(); |
@@ -707,13 +709,13 @@ namespace OpenSim.Region.Capabilities | |||
707 | SaveAssetToFile("updatedtaskscript" + Util.RandomClass.Next(1, 1000) + ".dat", data); | 709 | SaveAssetToFile("updatedtaskscript" + Util.RandomClass.Next(1, 1000) + ".dat", data); |
708 | } | 710 | } |
709 | 711 | ||
710 | // MainLog.Instance.Verbose("CAPS", "TaskInventoryScriptUpdater.uploaderCaps res: {0}", res); | 712 | // m_log.Info(String.Format("[CAPS]: TaskInventoryScriptUpdater.uploaderCaps res: {0}", res)); |
711 | 713 | ||
712 | return res; | 714 | return res; |
713 | } | 715 | } |
714 | catch (Exception e) | 716 | catch (Exception e) |
715 | { | 717 | { |
716 | MainLog.Instance.Error("CAPS", e.ToString()); | 718 | m_log.Error("[CAPS]: " + e.ToString()); |
717 | } | 719 | } |
718 | 720 | ||
719 | // XXX Maybe this should be some meaningful error packet | 721 | // XXX Maybe this should be some meaningful error packet |
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs index dd7c168..f6cfda7 100644 --- a/OpenSim/Framework/Communications/CommunicationsManager.cs +++ b/OpenSim/Framework/Communications/CommunicationsManager.cs | |||
@@ -36,6 +36,8 @@ namespace OpenSim.Framework.Communications | |||
36 | { | 36 | { |
37 | public class CommunicationsManager | 37 | public class CommunicationsManager |
38 | { | 38 | { |
39 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
40 | |||
39 | protected IUserService m_userService; | 41 | protected IUserService m_userService; |
40 | 42 | ||
41 | public IUserService UserService | 43 | public IUserService UserService |
@@ -114,11 +116,11 @@ namespace OpenSim.Framework.Communications | |||
114 | 116 | ||
115 | if (cmmdParams.Length < 2) | 117 | if (cmmdParams.Length < 2) |
116 | { | 118 | { |
117 | firstName = MainLog.Instance.CmdPrompt("First name", "Default"); | 119 | firstName = MainConsole.Instance.CmdPrompt("First name", "Default"); |
118 | lastName = MainLog.Instance.CmdPrompt("Last name", "User"); | 120 | lastName = MainConsole.Instance.CmdPrompt("Last name", "User"); |
119 | password = MainLog.Instance.PasswdPrompt("Password"); | 121 | password = MainConsole.Instance.PasswdPrompt("Password"); |
120 | regX = Convert.ToUInt32(MainLog.Instance.CmdPrompt("Start Region X", "1000")); | 122 | regX = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region X", "1000")); |
121 | regY = Convert.ToUInt32(MainLog.Instance.CmdPrompt("Start Region Y", "1000")); | 123 | regY = Convert.ToUInt32(MainConsole.Instance.CmdPrompt("Start Region Y", "1000")); |
122 | } | 124 | } |
123 | else | 125 | else |
124 | { | 126 | { |
diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs index a48988d..897aa9a 100644 --- a/OpenSim/Framework/Communications/InventoryServiceBase.cs +++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs | |||
@@ -36,6 +36,8 @@ namespace OpenSim.Framework.Communications | |||
36 | { | 36 | { |
37 | public abstract class InventoryServiceBase : IInventoryServices | 37 | public abstract class InventoryServiceBase : IInventoryServices |
38 | { | 38 | { |
39 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
40 | |||
39 | protected Dictionary<string, IInventoryData> m_plugins = new Dictionary<string, IInventoryData>(); | 41 | protected Dictionary<string, IInventoryData> m_plugins = new Dictionary<string, IInventoryData>(); |
40 | //protected IAssetServer m_assetServer; | 42 | //protected IAssetServer m_assetServer; |
41 | 43 | ||
@@ -52,7 +54,7 @@ namespace OpenSim.Framework.Communications | |||
52 | { | 54 | { |
53 | if (!String.IsNullOrEmpty(FileName)) | 55 | if (!String.IsNullOrEmpty(FileName)) |
54 | { | 56 | { |
55 | MainLog.Instance.Verbose("AGENTINVENTORY", "Inventorystorage: Attempting to load " + FileName); | 57 | m_log.Info("[AGENTINVENTORY]: Inventorystorage: Attempting to load " + FileName); |
56 | Assembly pluginAssembly = Assembly.LoadFrom(FileName); | 58 | Assembly pluginAssembly = Assembly.LoadFrom(FileName); |
57 | 59 | ||
58 | foreach (Type pluginType in pluginAssembly.GetTypes()) | 60 | foreach (Type pluginType in pluginAssembly.GetTypes()) |
@@ -67,7 +69,7 @@ namespace OpenSim.Framework.Communications | |||
67 | (IInventoryData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | 69 | (IInventoryData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); |
68 | plug.Initialise(); | 70 | plug.Initialise(); |
69 | m_plugins.Add(plug.getName(), plug); | 71 | m_plugins.Add(plug.getName(), plug); |
70 | MainLog.Instance.Verbose("AGENTINVENTORY", "Added IInventoryData Interface"); | 72 | m_log.Info("[AGENTINVENTORY]: Added IInventoryData Interface"); |
71 | } | 73 | } |
72 | } | 74 | } |
73 | } | 75 | } |
@@ -95,9 +97,8 @@ namespace OpenSim.Framework.Communications | |||
95 | rootFolder = plugin.Value.getUserRootFolder(userID); | 97 | rootFolder = plugin.Value.getUserRootFolder(userID); |
96 | if (rootFolder != null) | 98 | if (rootFolder != null) |
97 | { | 99 | { |
98 | MainLog.Instance.Verbose( | 100 | m_log.Info( |
99 | "INVENTORY", | 101 | "[INVENTORY]: Found root folder for user with ID " + userID + ". Retrieving inventory contents."); |
100 | "Found root folder for user with ID " + userID + ". Retrieving inventory contents."); | ||
101 | 102 | ||
102 | inventoryList = plugin.Value.getInventoryFolders(rootFolder.folderID); | 103 | inventoryList = plugin.Value.getInventoryFolders(rootFolder.folderID); |
103 | inventoryList.Insert(0, rootFolder); | 104 | inventoryList.Insert(0, rootFolder); |
@@ -105,8 +106,8 @@ namespace OpenSim.Framework.Communications | |||
105 | } | 106 | } |
106 | } | 107 | } |
107 | 108 | ||
108 | MainLog.Instance.Warn( | 109 | m_log.Warn( |
109 | "INVENTORY", "Could not find a root folder belonging to user with ID " + userID); | 110 | "[INVENTORY]: Could not find a root folder belonging to user with ID " + userID); |
110 | 111 | ||
111 | return inventoryList; | 112 | return inventoryList; |
112 | } | 113 | } |
@@ -226,10 +227,10 @@ namespace OpenSim.Framework.Communications | |||
226 | 227 | ||
227 | if (null != existingRootFolder) | 228 | if (null != existingRootFolder) |
228 | { | 229 | { |
229 | MainLog.Instance.Error( | 230 | m_log.Error( |
230 | "AGENTINVENTORY", | 231 | String.Format("[AGENTINVENTORY]: " + |
231 | "Did not create a new inventory for user {0} since they already have " | 232 | "Did not create a new inventory for user {0} since they already have " |
232 | + "a root inventory folder with id {1}", user, existingRootFolder); | 233 | + "a root inventory folder with id {1}", user, existingRootFolder)); |
233 | } | 234 | } |
234 | else | 235 | else |
235 | { | 236 | { |
@@ -251,6 +252,7 @@ namespace OpenSim.Framework.Communications | |||
251 | public virtual void CreateNewInventorySet(LLUUID user) | 252 | public virtual void CreateNewInventorySet(LLUUID user) |
252 | { | 253 | { |
253 | InventoryFolderBase folder = new InventoryFolderBase(); | 254 | InventoryFolderBase folder = new InventoryFolderBase(); |
255 | |||
254 | folder.parentID = LLUUID.Zero; | 256 | folder.parentID = LLUUID.Zero; |
255 | folder.agentID = user; | 257 | folder.agentID = user; |
256 | folder.folderID = LLUUID.Random(); | 258 | folder.folderID = LLUUID.Random(); |
diff --git a/OpenSim/Framework/Communications/LoginResponse.cs b/OpenSim/Framework/Communications/LoginResponse.cs index 7f8658d..9036884 100644 --- a/OpenSim/Framework/Communications/LoginResponse.cs +++ b/OpenSim/Framework/Communications/LoginResponse.cs | |||
@@ -42,6 +42,8 @@ namespace OpenSim.Framework.UserManagement | |||
42 | /// </summary> | 42 | /// </summary> |
43 | public class LoginResponse | 43 | public class LoginResponse |
44 | { | 44 | { |
45 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | |||
45 | private Hashtable loginFlagsHash; | 47 | private Hashtable loginFlagsHash; |
46 | private Hashtable globalTexturesHash; | 48 | private Hashtable globalTexturesHash; |
47 | private Hashtable loginError; | 49 | private Hashtable loginError; |
@@ -362,10 +364,8 @@ namespace OpenSim.Framework.UserManagement | |||
362 | } | 364 | } |
363 | catch (Exception e) | 365 | catch (Exception e) |
364 | { | 366 | { |
365 | MainLog.Instance.Warn( | 367 | m_log.Warn("[CLIENT]: LoginResponse: Error creating XML-RPC Response: " + e.Message); |
366 | "CLIENT", | 368 | |
367 | "LoginResponse: Error creating XML-RPC Response: " + e.Message | ||
368 | ); | ||
369 | return (GenerateFailureResponse("Internal Error", "Error generating Login Response", "false")); | 369 | return (GenerateFailureResponse("Internal Error", "Error generating Login Response", "false")); |
370 | } | 370 | } |
371 | } // ToXmlRpcResponse | 371 | } // ToXmlRpcResponse |
@@ -461,10 +461,8 @@ namespace OpenSim.Framework.UserManagement | |||
461 | } | 461 | } |
462 | catch (Exception e) | 462 | catch (Exception e) |
463 | { | 463 | { |
464 | MainLog.Instance.Warn( | 464 | m_log.Warn("[CLIENT]: LoginResponse: Error creating XML-RPC Response: " + e.Message); |
465 | "CLIENT", | 465 | |
466 | "LoginResponse: Error creating XML-RPC Response: " + e.Message | ||
467 | ); | ||
468 | return GenerateFailureResponseLLSD("Internal Error", "Error generating Login Response", "false"); | 466 | return GenerateFailureResponseLLSD("Internal Error", "Error generating Login Response", "false"); |
469 | } | 467 | } |
470 | } | 468 | } |
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs index 865349f..db86a97 100644 --- a/OpenSim/Framework/Communications/LoginService.cs +++ b/OpenSim/Framework/Communications/LoginService.cs | |||
@@ -44,6 +44,8 @@ namespace OpenSim.Framework.UserManagement | |||
44 | { | 44 | { |
45 | public class LoginService | 45 | public class LoginService |
46 | { | 46 | { |
47 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
48 | |||
47 | protected string m_welcomeMessage = "Welcome to OpenSim"; | 49 | protected string m_welcomeMessage = "Welcome to OpenSim"; |
48 | protected UserManagerBase m_userManager = null; | 50 | protected UserManagerBase m_userManager = null; |
49 | protected Mutex m_loginMutex = new Mutex(false); | 51 | protected Mutex m_loginMutex = new Mutex(false); |
@@ -83,7 +85,7 @@ namespace OpenSim.Framework.UserManagement | |||
83 | try | 85 | try |
84 | { | 86 | { |
85 | //CFK: CustomizeResponse contains sufficient strings to alleviate the need for this. | 87 | //CFK: CustomizeResponse contains sufficient strings to alleviate the need for this. |
86 | //CKF: MainLog.Instance.Verbose("LOGIN", "Attempting login now..."); | 88 | //CKF: m_log.Info("[LOGIN]: Attempting login now..."); |
87 | XmlRpcResponse response = new XmlRpcResponse(); | 89 | XmlRpcResponse response = new XmlRpcResponse(); |
88 | Hashtable requestData = (Hashtable) request.Params[0]; | 90 | Hashtable requestData = (Hashtable) request.Params[0]; |
89 | 91 | ||
@@ -102,16 +104,14 @@ namespace OpenSim.Framework.UserManagement | |||
102 | if( requestData.Contains("version")) | 104 | if( requestData.Contains("version")) |
103 | { | 105 | { |
104 | string clientversion = (string)requestData["version"]; | 106 | string clientversion = (string)requestData["version"]; |
105 | MainLog.Instance.Verbose("LOGIN","Client Version " + clientversion + " for " + firstname + " " + lastname); | 107 | m_log.Info("[LOGIN]: Client Version " + clientversion + " for " + firstname + " " + lastname); |
106 | } | 108 | } |
107 | 109 | ||
108 | 110 | ||
109 | userProfile = GetTheUser(firstname, lastname); | 111 | userProfile = GetTheUser(firstname, lastname); |
110 | if (userProfile == null) | 112 | if (userProfile == null) |
111 | { | 113 | { |
112 | MainLog.Instance.Verbose( | 114 | m_log.Info("[LOGIN]: Could not find a profile for " + firstname + " " + lastname); |
113 | "LOGIN", | ||
114 | "Could not find a profile for " + firstname + " " + lastname); | ||
115 | 115 | ||
116 | return logResponse.CreateLoginFailedResponse(); | 116 | return logResponse.CreateLoginFailedResponse(); |
117 | } | 117 | } |
@@ -213,7 +213,7 @@ namespace OpenSim.Framework.UserManagement | |||
213 | } | 213 | } |
214 | catch (Exception e) | 214 | catch (Exception e) |
215 | { | 215 | { |
216 | MainLog.Instance.Verbose("LOGIN", e.ToString()); | 216 | m_log.Info("[LOGIN]: " + e.ToString()); |
217 | return logResponse.CreateDeadRegionResponse(); | 217 | return logResponse.CreateDeadRegionResponse(); |
218 | //return logResponse.ToXmlRpcResponse(); | 218 | //return logResponse.ToXmlRpcResponse(); |
219 | } | 219 | } |
@@ -225,10 +225,9 @@ namespace OpenSim.Framework.UserManagement | |||
225 | 225 | ||
226 | return logResponse.ToXmlRpcResponse(); | 226 | return logResponse.ToXmlRpcResponse(); |
227 | } | 227 | } |
228 | 228 | catch (Exception e) | |
229 | catch (Exception E) | ||
230 | { | 229 | { |
231 | MainLog.Instance.Verbose("LOGIN", E.ToString()); | 230 | m_log.Info("[LOGIN]: " + e.ToString()); |
232 | } | 231 | } |
233 | //} | 232 | //} |
234 | } | 233 | } |
@@ -265,9 +264,7 @@ namespace OpenSim.Framework.UserManagement | |||
265 | userProfile = GetTheUser(firstname, lastname); | 264 | userProfile = GetTheUser(firstname, lastname); |
266 | if (userProfile == null) | 265 | if (userProfile == null) |
267 | { | 266 | { |
268 | MainLog.Instance.Verbose( | 267 | m_log.Info("[LOGIN]: Could not find a profile for " + firstname + " " + lastname); |
269 | "LOGIN", | ||
270 | "Could not find a profile for " + firstname + " " + lastname); | ||
271 | 268 | ||
272 | return logResponse.CreateLoginFailedResponseLLSD(); | 269 | return logResponse.CreateLoginFailedResponseLLSD(); |
273 | } | 270 | } |
@@ -345,7 +342,7 @@ namespace OpenSim.Framework.UserManagement | |||
345 | } | 342 | } |
346 | catch (Exception ex) | 343 | catch (Exception ex) |
347 | { | 344 | { |
348 | MainLog.Instance.Verbose("LOGIN", ex.ToString()); | 345 | m_log.Info("[LOGIN]: " + ex.ToString()); |
349 | return logResponse.CreateDeadRegionResponseLLSD(); | 346 | return logResponse.CreateDeadRegionResponseLLSD(); |
350 | } | 347 | } |
351 | 348 | ||
@@ -359,7 +356,7 @@ namespace OpenSim.Framework.UserManagement | |||
359 | } | 356 | } |
360 | catch (Exception ex) | 357 | catch (Exception ex) |
361 | { | 358 | { |
362 | MainLog.Instance.Verbose("LOGIN", ex.ToString()); | 359 | m_log.Info("[LOGIN]: " + ex.ToString()); |
363 | return logResponse.CreateFailedResponseLLSD(); | 360 | return logResponse.CreateFailedResponseLLSD(); |
364 | } | 361 | } |
365 | } | 362 | } |
@@ -458,7 +455,7 @@ namespace OpenSim.Framework.UserManagement | |||
458 | string redirectURL = "about:blank?redirect-http-hack=" + System.Web.HttpUtility.UrlEncode("secondlife:///app/login?first_name=" + firstname + "&last_name=" + | 455 | string redirectURL = "about:blank?redirect-http-hack=" + System.Web.HttpUtility.UrlEncode("secondlife:///app/login?first_name=" + firstname + "&last_name=" + |
459 | lastname + | 456 | lastname + |
460 | "&location=" + location + "&grid=Other&web_login_key=" + webloginkey.ToString()); | 457 | "&location=" + location + "&grid=Other&web_login_key=" + webloginkey.ToString()); |
461 | //MainLog.Instance.Verbose("WEB", "R:" + redirectURL); | 458 | //m_log.Info("[WEB]: R:" + redirectURL); |
462 | returnactions["int_response_code"] = statuscode; | 459 | returnactions["int_response_code"] = statuscode; |
463 | returnactions["str_redirect_location"] = redirectURL; | 460 | returnactions["str_redirect_location"] = redirectURL; |
464 | returnactions["str_response_string"] = "<HTML><BODY>GoodLogin</BODY></HTML>"; | 461 | returnactions["str_response_string"] = "<HTML><BODY>GoodLogin</BODY></HTML>"; |
@@ -604,27 +601,22 @@ namespace OpenSim.Framework.UserManagement | |||
604 | public virtual bool AuthenticateUser(UserProfileData profile, string password) | 601 | public virtual bool AuthenticateUser(UserProfileData profile, string password) |
605 | { | 602 | { |
606 | bool passwordSuccess = false; | 603 | bool passwordSuccess = false; |
607 | MainLog.Instance.Verbose( | 604 | m_log.Info( |
608 | "LOGIN", "Authenticating {0} {1} ({2})", profile.username, profile.surname, profile.UUID); | 605 | String.Format("[LOGIN]: Authenticating {0} {1} ({2})", profile.username, profile.surname, profile.UUID)); |
609 | 606 | ||
610 | // Web Login method seems to also occasionally send the hashed password itself | 607 | // Web Login method seems to also occasionally send the hashed password itself |
611 | 608 | ||
612 | |||
613 | // we do this to get our hash in a form that the server password code can consume | 609 | // we do this to get our hash in a form that the server password code can consume |
614 | // when the web-login-form submits the password in the clear (supposed to be over SSL!) | 610 | // when the web-login-form submits the password in the clear (supposed to be over SSL!) |
615 | if (!password.StartsWith("$1$")) | 611 | if (!password.StartsWith("$1$")) |
616 | password = "$1$" + Util.Md5Hash(password); | 612 | password = "$1$" + Util.Md5Hash(password); |
617 | 613 | ||
618 | |||
619 | |||
620 | password = password.Remove(0, 3); //remove $1$ | 614 | password = password.Remove(0, 3); //remove $1$ |
621 | 615 | ||
622 | |||
623 | |||
624 | string s = Util.Md5Hash(password + ":" + profile.passwordSalt); | 616 | string s = Util.Md5Hash(password + ":" + profile.passwordSalt); |
625 | // Testing... | 617 | // Testing... |
626 | //MainLog.Instance.Verbose("LOGIN", "SubHash:" + s + " userprofile:" + profile.passwordHash); | 618 | //m_log.Info("[LOGIN]: SubHash:" + s + " userprofile:" + profile.passwordHash); |
627 | //MainLog.Instance.Verbose("LOGIN", "userprofile:" + profile.passwordHash + " SubCT:" + password); | 619 | //m_log.Info("[LOGIN]: userprofile:" + profile.passwordHash + " SubCT:" + password); |
628 | 620 | ||
629 | passwordSuccess = (profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase) | 621 | passwordSuccess = (profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase) |
630 | || profile.passwordHash.Equals(password,StringComparison.InvariantCultureIgnoreCase)); | 622 | || profile.passwordHash.Equals(password,StringComparison.InvariantCultureIgnoreCase)); |
@@ -635,8 +627,8 @@ namespace OpenSim.Framework.UserManagement | |||
635 | public virtual bool AuthenticateUser(UserProfileData profile, LLUUID webloginkey) | 627 | public virtual bool AuthenticateUser(UserProfileData profile, LLUUID webloginkey) |
636 | { | 628 | { |
637 | bool passwordSuccess = false; | 629 | bool passwordSuccess = false; |
638 | MainLog.Instance.Verbose( | 630 | m_log.Info( |
639 | "LOGIN", "Authenticating {0} {1} ({2})", profile.username, profile.surname, profile.UUID); | 631 | String.Format("[LOGIN]: Authenticating {0} {1} ({2})", profile.username, profile.surname, profile.UUID)); |
640 | 632 | ||
641 | // Match web login key unless it's the default weblogin key LLUUID.Zero | 633 | // Match web login key unless it's the default weblogin key LLUUID.Zero |
642 | passwordSuccess = ((profile.webLoginKey==webloginkey) && profile.webLoginKey != LLUUID.Zero); | 634 | passwordSuccess = ((profile.webLoginKey==webloginkey) && profile.webLoginKey != LLUUID.Zero); |
diff --git a/OpenSim/Framework/Communications/RestClient/RestClient.cs b/OpenSim/Framework/Communications/RestClient/RestClient.cs index 76bad64..f968c9a 100644 --- a/OpenSim/Framework/Communications/RestClient/RestClient.cs +++ b/OpenSim/Framework/Communications/RestClient/RestClient.cs | |||
@@ -56,6 +56,8 @@ namespace OpenSim.Framework.Communications | |||
56 | /// </remarks> | 56 | /// </remarks> |
57 | public class RestClient | 57 | public class RestClient |
58 | { | 58 | { |
59 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
60 | |||
59 | private string realuri; | 61 | private string realuri; |
60 | 62 | ||
61 | #region member variables | 63 | #region member variables |
@@ -238,7 +240,7 @@ namespace OpenSim.Framework.Communications | |||
238 | } | 240 | } |
239 | } | 241 | } |
240 | realuri = sb.ToString(); | 242 | realuri = sb.ToString(); |
241 | MainLog.Instance.Verbose("REST", "RestURL: {0}", realuri); | 243 | m_log.Info(String.Format("[REST]: RestURL: {0}", realuri)); |
242 | return new Uri(sb.ToString()); | 244 | return new Uri(sb.ToString()); |
243 | } | 245 | } |
244 | 246 | ||
@@ -374,16 +376,16 @@ namespace OpenSim.Framework.Communications | |||
374 | _asyncException = null; | 376 | _asyncException = null; |
375 | _request.ContentLength = src.Length; | 377 | _request.ContentLength = src.Length; |
376 | 378 | ||
377 | MainLog.Instance.Verbose("REST", "Request Length {0}", _request.ContentLength); | 379 | m_log.Info(String.Format("[REST]: Request Length {0}", _request.ContentLength)); |
378 | MainLog.Instance.Verbose("REST", "Sending Web Request {0}", buildUri()); | 380 | m_log.Info(String.Format("[REST]: Sending Web Request {0}", buildUri())); |
379 | src.Seek(0, SeekOrigin.Begin); | 381 | src.Seek(0, SeekOrigin.Begin); |
380 | MainLog.Instance.Verbose("REST", "Seek is ok"); | 382 | m_log.Info("[REST]: Seek is ok"); |
381 | Stream dst = _request.GetRequestStream(); | 383 | Stream dst = _request.GetRequestStream(); |
382 | MainLog.Instance.Verbose("REST", "GetRequestStream is ok"); | 384 | m_log.Info("[REST]: GetRequestStream is ok"); |
383 | 385 | ||
384 | byte[] buf = new byte[1024]; | 386 | byte[] buf = new byte[1024]; |
385 | int length = src.Read(buf, 0, 1024); | 387 | int length = src.Read(buf, 0, 1024); |
386 | MainLog.Instance.Verbose("REST", "First Read is ok"); | 388 | m_log.Info("[REST]: First Read is ok"); |
387 | while (length > 0) | 389 | while (length > 0) |
388 | { | 390 | { |
389 | dst.Write(buf, 0, length); | 391 | dst.Write(buf, 0, length); |
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs index 3b1d837..edab6ae 100644 --- a/OpenSim/Framework/Communications/UserManagerBase.cs +++ b/OpenSim/Framework/Communications/UserManagerBase.cs | |||
@@ -43,6 +43,8 @@ namespace OpenSim.Framework.UserManagement | |||
43 | /// </summary> | 43 | /// </summary> |
44 | public abstract class UserManagerBase : IUserService | 44 | public abstract class UserManagerBase : IUserService |
45 | { | 45 | { |
46 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
47 | |||
46 | public UserConfig _config; | 48 | public UserConfig _config; |
47 | private Dictionary<string, IUserData> _plugins = new Dictionary<string, IUserData>(); | 49 | private Dictionary<string, IUserData> _plugins = new Dictionary<string, IUserData>(); |
48 | 50 | ||
@@ -54,10 +56,10 @@ namespace OpenSim.Framework.UserManagement | |||
54 | { | 56 | { |
55 | if (!String.IsNullOrEmpty(FileName)) | 57 | if (!String.IsNullOrEmpty(FileName)) |
56 | { | 58 | { |
57 | MainLog.Instance.Verbose("USERSTORAGE", "Attempting to load " + FileName); | 59 | m_log.Info("[USERSTORAGE]: Attempting to load " + FileName); |
58 | Assembly pluginAssembly = Assembly.LoadFrom(FileName); | 60 | Assembly pluginAssembly = Assembly.LoadFrom(FileName); |
59 | 61 | ||
60 | MainLog.Instance.Verbose("USERSTORAGE", "Found " + pluginAssembly.GetTypes().Length + " interfaces."); | 62 | m_log.Info("[USERSTORAGE]: Found " + pluginAssembly.GetTypes().Length + " interfaces."); |
61 | foreach (Type pluginType in pluginAssembly.GetTypes()) | 63 | foreach (Type pluginType in pluginAssembly.GetTypes()) |
62 | { | 64 | { |
63 | if (!pluginType.IsAbstract) | 65 | if (!pluginType.IsAbstract) |
@@ -79,7 +81,7 @@ namespace OpenSim.Framework.UserManagement | |||
79 | { | 81 | { |
80 | plug.Initialise(); | 82 | plug.Initialise(); |
81 | _plugins.Add(plug.getName(), plug); | 83 | _plugins.Add(plug.getName(), plug); |
82 | MainLog.Instance.Verbose("USERSTORAGE", "Added IUserData Interface"); | 84 | m_log.Info("[USERSTORAGE]: Added IUserData Interface"); |
83 | } | 85 | } |
84 | 86 | ||
85 | #region Get UserProfile | 87 | #region Get UserProfile |
@@ -116,8 +118,7 @@ namespace OpenSim.Framework.UserManagement | |||
116 | } | 118 | } |
117 | catch (Exception) | 119 | catch (Exception) |
118 | { | 120 | { |
119 | MainLog.Instance.Verbose("USERSTORAGE", | 121 | m_log.Info("[USERSTORAGE]: Unable to generate AgentPickerData via " + plugin.Key + "(" + query + ")"); |
120 | "Unable to generate AgentPickerData via " + plugin.Key + "(" + query + ")"); | ||
121 | return new List<AvatarPickerAvatar>(); | 122 | return new List<AvatarPickerAvatar>(); |
122 | } | 123 | } |
123 | } | 124 | } |
@@ -163,8 +164,7 @@ namespace OpenSim.Framework.UserManagement | |||
163 | } | 164 | } |
164 | catch (Exception e) | 165 | catch (Exception e) |
165 | { | 166 | { |
166 | MainLog.Instance.Verbose("USERSTORAGE", | 167 | m_log.Info("[USERSTORAGE]: Unable to set user via " + plugin.Key + "(" + e.ToString() + ")"); |
167 | "Unable to set user via " + plugin.Key + "(" + e.ToString() + ")"); | ||
168 | } | 168 | } |
169 | } | 169 | } |
170 | 170 | ||
@@ -190,8 +190,7 @@ namespace OpenSim.Framework.UserManagement | |||
190 | } | 190 | } |
191 | catch (Exception e) | 191 | catch (Exception e) |
192 | { | 192 | { |
193 | MainLog.Instance.Verbose("USERSTORAGE", | 193 | m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); |
194 | "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); | ||
195 | } | 194 | } |
196 | } | 195 | } |
197 | 196 | ||
@@ -214,8 +213,7 @@ namespace OpenSim.Framework.UserManagement | |||
214 | } | 213 | } |
215 | catch (Exception e) | 214 | catch (Exception e) |
216 | { | 215 | { |
217 | MainLog.Instance.Verbose("USERSTORAGE", | 216 | m_log.Info("[USERSTORAGE]: Unable to GetUserFriendList via " + plugin.Key + "(" + e.ToString() + ")"); |
218 | "Unable to GetUserFriendList via " + plugin.Key + "(" + e.ToString() + ")"); | ||
219 | } | 217 | } |
220 | } | 218 | } |
221 | 219 | ||
@@ -234,8 +232,7 @@ namespace OpenSim.Framework.UserManagement | |||
234 | } | 232 | } |
235 | catch (Exception e) | 233 | catch (Exception e) |
236 | { | 234 | { |
237 | MainLog.Instance.Verbose("USERSTORAGE", | 235 | m_log.Info("[USERSTORAGE]: Unable to Store WebLoginKey via " + plugin.Key + "(" + e.ToString() + ")"); |
238 | "Unable to Store WebLoginKey via " + plugin.Key + "(" + e.ToString() + ")"); | ||
239 | } | 236 | } |
240 | } | 237 | } |
241 | } | 238 | } |
@@ -250,8 +247,7 @@ namespace OpenSim.Framework.UserManagement | |||
250 | } | 247 | } |
251 | catch (Exception e) | 248 | catch (Exception e) |
252 | { | 249 | { |
253 | MainLog.Instance.Verbose("USERSTORAGE", | 250 | m_log.Info("[USERSTORAGE]: Unable to AddNewUserFriend via " + plugin.Key + "(" + e.ToString() + ")"); |
254 | "Unable to AddNewUserFriend via " + plugin.Key + "(" + e.ToString() + ")"); | ||
255 | } | 251 | } |
256 | } | 252 | } |
257 | 253 | ||
@@ -268,8 +264,7 @@ namespace OpenSim.Framework.UserManagement | |||
268 | } | 264 | } |
269 | catch (Exception e) | 265 | catch (Exception e) |
270 | { | 266 | { |
271 | MainLog.Instance.Verbose("USERSTORAGE", | 267 | m_log.Info("[USERSTORAGE]: Unable to RemoveUserFriend via " + plugin.Key + "(" + e.ToString() + ")"); |
272 | "Unable to RemoveUserFriend via " + plugin.Key + "(" + e.ToString() + ")"); | ||
273 | } | 268 | } |
274 | } | 269 | } |
275 | } | 270 | } |
@@ -284,8 +279,7 @@ namespace OpenSim.Framework.UserManagement | |||
284 | } | 279 | } |
285 | catch (Exception e) | 280 | catch (Exception e) |
286 | { | 281 | { |
287 | MainLog.Instance.Verbose("USERSTORAGE", | 282 | m_log.Info("[USERSTORAGE]: Unable to UpdateUserFriendPerms via " + plugin.Key + "(" + e.ToString() + ")"); |
288 | "Unable to UpdateUserFriendPerms via " + plugin.Key + "(" + e.ToString() + ")"); | ||
289 | } | 283 | } |
290 | } | 284 | } |
291 | } | 285 | } |
@@ -304,8 +298,7 @@ namespace OpenSim.Framework.UserManagement | |||
304 | } | 298 | } |
305 | catch (Exception e) | 299 | catch (Exception e) |
306 | { | 300 | { |
307 | MainLog.Instance.Verbose("USERSTORAGE", | 301 | m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); |
308 | "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); | ||
309 | } | 302 | } |
310 | } | 303 | } |
311 | 304 | ||
@@ -337,8 +330,7 @@ namespace OpenSim.Framework.UserManagement | |||
337 | } | 330 | } |
338 | catch (Exception e) | 331 | catch (Exception e) |
339 | { | 332 | { |
340 | MainLog.Instance.Verbose("USERSTORAGE", | 333 | m_log.Info("[USERSTORAGE]: Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); |
341 | "Unable to find user via " + plugin.Key + "(" + e.ToString() + ")"); | ||
342 | } | 334 | } |
343 | } | 335 | } |
344 | 336 | ||
@@ -454,14 +446,14 @@ namespace OpenSim.Framework.UserManagement | |||
454 | } | 446 | } |
455 | else | 447 | else |
456 | { | 448 | { |
457 | MainLog.Instance.Verbose("LOGOUT", "didn't save logout position, currentAgent is null *do Fix "); | 449 | m_log.Info("[LOGOUT]: didn't save logout position, currentAgent is null *do Fix "); |
458 | } | 450 | } |
459 | MainLog.Instance.Verbose("LOGOUT", userProfile.username + " " + userProfile.surname + " from " + regionhandle + "(" + posx + "," + posy + "," + posz + ")" ); | 451 | m_log.Info("[LOGOUT]: " + userProfile.username + " " + userProfile.surname + " from " + regionhandle + "(" + posx + "," + posy + "," + posz + ")" ); |
460 | MainLog.Instance.Verbose("LOGOUT", "userid: " + userid.ToString() + " regionid: " + regionid.ToString() ); | 452 | m_log.Info("[LOGOUT]: userid: " + userid.ToString() + " regionid: " + regionid.ToString() ); |
461 | } | 453 | } |
462 | else | 454 | else |
463 | { | 455 | { |
464 | MainLog.Instance.Warn("LOGOUT", "Unknown User logged out"); | 456 | m_log.Warn("[LOGOUT]: Unknown User logged out"); |
465 | } | 457 | } |
466 | } | 458 | } |
467 | 459 | ||
@@ -539,8 +531,7 @@ namespace OpenSim.Framework.UserManagement | |||
539 | } | 531 | } |
540 | catch (Exception e) | 532 | catch (Exception e) |
541 | { | 533 | { |
542 | MainLog.Instance.Verbose("USERSTORAGE", | 534 | m_log.Info("[USERSTORAGE]: Unable to add user via " + plugin.Key + "(" + e.ToString() + ")"); |
543 | "Unable to add user via " + plugin.Key + "(" + e.ToString() + ")"); | ||
544 | } | 535 | } |
545 | } | 536 | } |
546 | 537 | ||
diff --git a/OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs b/OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs index e27c88b..a657c3a 100644 --- a/OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs +++ b/OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs | |||
@@ -35,6 +35,8 @@ namespace OpenSim.Framework.Configuration.HTTP | |||
35 | { | 35 | { |
36 | public class HTTPConfiguration : IGenericConfig | 36 | public class HTTPConfiguration : IGenericConfig |
37 | { | 37 | { |
38 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
39 | |||
38 | private RemoteConfigSettings remoteConfigSettings; | 40 | private RemoteConfigSettings remoteConfigSettings; |
39 | 41 | ||
40 | private XmlConfiguration xmlConfig; | 42 | private XmlConfiguration xmlConfig; |
@@ -81,7 +83,7 @@ namespace OpenSim.Framework.Configuration.HTTP | |||
81 | } | 83 | } |
82 | catch (WebException) | 84 | catch (WebException) |
83 | { | 85 | { |
84 | MainLog.Instance.Warn("Unable to connect to remote configuration file (" + | 86 | m_log.Warn("Unable to connect to remote configuration file (" + |
85 | remoteConfigSettings.baseConfigURL + configFileName + | 87 | remoteConfigSettings.baseConfigURL + configFileName + |
86 | "). Creating local file instead."); | 88 | "). Creating local file instead."); |
87 | xmlConfig.SetFileName(configFileName); | 89 | xmlConfig.SetFileName(configFileName); |
diff --git a/OpenSim/Framework/ConfigurationMember.cs b/OpenSim/Framework/ConfigurationMember.cs index 7590495..921fb66 100644 --- a/OpenSim/Framework/ConfigurationMember.cs +++ b/OpenSim/Framework/ConfigurationMember.cs | |||
@@ -39,6 +39,8 @@ namespace OpenSim.Framework | |||
39 | { | 39 | { |
40 | public class ConfigurationMember | 40 | public class ConfigurationMember |
41 | { | 41 | { |
42 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
43 | |||
42 | public delegate bool ConfigurationOptionResult(string configuration_key, object configuration_result); | 44 | public delegate bool ConfigurationOptionResult(string configuration_key, object configuration_result); |
43 | 45 | ||
44 | public delegate void ConfigurationOptionsLoad(); | 46 | public delegate void ConfigurationOptionsLoad(); |
@@ -110,7 +112,7 @@ namespace OpenSim.Framework | |||
110 | } | 112 | } |
111 | else | 113 | else |
112 | { | 114 | { |
113 | MainLog.Instance.Notice( | 115 | m_log.Info( |
114 | "Required fields for adding a configuration option is invalid. Will not add this option (" + | 116 | "Required fields for adding a configuration option is invalid. Will not add this option (" + |
115 | option.configurationKey + ")"); | 117 | option.configurationKey + ")"); |
116 | } | 118 | } |
@@ -147,46 +149,44 @@ namespace OpenSim.Framework | |||
147 | checkAndAddConfigOption(configOption); | 149 | checkAndAddConfigOption(configOption); |
148 | } | 150 | } |
149 | 151 | ||
150 | |||
151 | // TEMP - REMOVE | 152 | // TEMP - REMOVE |
152 | private int cE = 0; | 153 | private int cE = 0; |
153 | public void performConfigurationRetrieve() | 154 | public void performConfigurationRetrieve() |
154 | { | 155 | { |
155 | if (cE > 1) | 156 | if (cE > 1) |
156 | MainLog.Instance.Error("READING CONFIGURATION COUT: " + cE.ToString()); | 157 | m_log.Error("READING CONFIGURATION COUT: " + cE.ToString()); |
157 | 158 | ||
158 | 159 | ||
159 | configurationPlugin = LoadConfigDll(configurationPluginFilename); | 160 | configurationPlugin = LoadConfigDll(configurationPluginFilename); |
160 | configurationOptions.Clear(); | 161 | configurationOptions.Clear(); |
161 | if (loadFunction == null) | 162 | if (loadFunction == null) |
162 | { | 163 | { |
163 | MainLog.Instance.Error("Load Function for '" + configurationDescription + | 164 | m_log.Error("Load Function for '" + configurationDescription + |
164 | "' is null. Refusing to run configuration."); | 165 | "' is null. Refusing to run configuration."); |
165 | return; | 166 | return; |
166 | } | 167 | } |
167 | 168 | ||
168 | if (resultFunction == null) | 169 | if (resultFunction == null) |
169 | { | 170 | { |
170 | MainLog.Instance.Error("Result Function for '" + configurationDescription + | 171 | m_log.Error("Result Function for '" + configurationDescription + |
171 | "' is null. Refusing to run configuration."); | 172 | "' is null. Refusing to run configuration."); |
172 | return; | 173 | return; |
173 | } | 174 | } |
174 | 175 | ||
175 | MainLog.Instance.Verbose("CONFIG", "Calling Configuration Load Function..."); | 176 | m_log.Info("[CONFIG]: Calling Configuration Load Function..."); |
176 | loadFunction(); | 177 | loadFunction(); |
177 | 178 | ||
178 | if (configurationOptions.Count <= 0) | 179 | if (configurationOptions.Count <= 0) |
179 | { | 180 | { |
180 | MainLog.Instance.Error("CONFIG", | 181 | m_log.Error("[CONFIG]: No configuration options were specified for '" + configurationOptions + |
181 | "No configuration options were specified for '" + configurationOptions + | 182 | "'. Refusing to continue configuration."); |
182 | "'. Refusing to continue configuration."); | ||
183 | return; | 183 | return; |
184 | } | 184 | } |
185 | 185 | ||
186 | bool useFile = true; | 186 | bool useFile = true; |
187 | if (configurationPlugin == null) | 187 | if (configurationPlugin == null) |
188 | { | 188 | { |
189 | MainLog.Instance.Error("CONFIG", "Configuration Plugin NOT LOADED!"); | 189 | m_log.Error("[CONFIG]: Configuration Plugin NOT LOADED!"); |
190 | return; | 190 | return; |
191 | } | 191 | } |
192 | 192 | ||
@@ -200,7 +200,7 @@ namespace OpenSim.Framework | |||
200 | } | 200 | } |
201 | catch (XmlException e) | 201 | catch (XmlException e) |
202 | { | 202 | { |
203 | MainLog.Instance.Error("Error loading " + configurationFilename + ": " + e.ToString()); | 203 | m_log.Error("Error loading " + configurationFilename + ": " + e.ToString()); |
204 | useFile = false; | 204 | useFile = false; |
205 | } | 205 | } |
206 | } | 206 | } |
@@ -208,11 +208,11 @@ namespace OpenSim.Framework | |||
208 | { | 208 | { |
209 | if (configurationFromXMLNode != null) | 209 | if (configurationFromXMLNode != null) |
210 | { | 210 | { |
211 | MainLog.Instance.Notice("Loading from XML Node, will not save to the file"); | 211 | m_log.Info("Loading from XML Node, will not save to the file"); |
212 | configurationPlugin.LoadDataFromString(configurationFromXMLNode.OuterXml); | 212 | configurationPlugin.LoadDataFromString(configurationFromXMLNode.OuterXml); |
213 | } | 213 | } |
214 | 214 | ||
215 | MainLog.Instance.Notice("XML Configuration Filename is not valid; will not save to the file."); | 215 | m_log.Info("XML Configuration Filename is not valid; will not save to the file."); |
216 | useFile = false; | 216 | useFile = false; |
217 | } | 217 | } |
218 | 218 | ||
@@ -253,15 +253,15 @@ namespace OpenSim.Framework | |||
253 | if (configurationDescription.Trim() != String.Empty) | 253 | if (configurationDescription.Trim() != String.Empty) |
254 | { | 254 | { |
255 | console_result = | 255 | console_result = |
256 | MainLog.Instance.CmdPrompt( | 256 | MainConsole.Instance.CmdPrompt( |
257 | configurationDescription + ": " + configOption.configurationQuestion, | 257 | configurationDescription + ": " + configOption.configurationQuestion, |
258 | configOption.configurationDefault); | 258 | configOption.configurationDefault); |
259 | } | 259 | } |
260 | else | 260 | else |
261 | { | 261 | { |
262 | console_result = | 262 | console_result = |
263 | MainLog.Instance.CmdPrompt(configOption.configurationQuestion, | 263 | MainConsole.Instance.CmdPrompt(configOption.configurationQuestion, |
264 | configOption.configurationDefault); | 264 | configOption.configurationDefault); |
265 | } | 265 | } |
266 | } | 266 | } |
267 | else | 267 | else |
@@ -431,7 +431,7 @@ namespace OpenSim.Framework | |||
431 | 431 | ||
432 | if (!resultFunction(configOption.configurationKey, return_result)) | 432 | if (!resultFunction(configOption.configurationKey, return_result)) |
433 | { | 433 | { |
434 | MainLog.Instance.Notice( | 434 | m_log.Info( |
435 | "The handler for the last configuration option denied that input, please try again."); | 435 | "The handler for the last configuration option denied that input, please try again."); |
436 | convertSuccess = false; | 436 | convertSuccess = false; |
437 | ignoreNextFromConfig = true; | 437 | ignoreNextFromConfig = true; |
@@ -441,20 +441,18 @@ namespace OpenSim.Framework | |||
441 | { | 441 | { |
442 | if (configOption.configurationUseDefaultNoPrompt) | 442 | if (configOption.configurationUseDefaultNoPrompt) |
443 | { | 443 | { |
444 | MainLog.Instance.Error("CONFIG", | 444 | m_log.Error(string.Format( |
445 | string.Format( | 445 | "[CONFIG]: [{3}]:[{1}] is not valid default for parameter [{0}].\nThe configuration result must be parsable to {2}.\n", |
446 | "[{3}]:[{1}] is not valid default for parameter [{0}].\nThe configuration result must be parsable to {2}.\n", | 446 | configOption.configurationKey, console_result, errorMessage, |
447 | configOption.configurationKey, console_result, errorMessage, | 447 | configurationFilename)); |
448 | configurationFilename)); | ||
449 | convertSuccess = true; | 448 | convertSuccess = true; |
450 | } | 449 | } |
451 | else | 450 | else |
452 | { | 451 | { |
453 | MainLog.Instance.Warn("CONFIG", | 452 | m_log.Warn(string.Format( |
454 | string.Format( | 453 | "[CONFIG]: [{3}]:[{1}] is not a valid value [{0}].\nThe configuration result must be parsable to {2}.\n", |
455 | "[{3}]:[{1}] is not a valid value [{0}].\nThe configuration result must be parsable to {2}.\n", | 454 | configOption.configurationKey, console_result, errorMessage, |
456 | configOption.configurationKey, console_result, errorMessage, | 455 | configurationFilename)); |
457 | configurationFilename)); | ||
458 | ignoreNextFromConfig = true; | 456 | ignoreNextFromConfig = true; |
459 | } | 457 | } |
460 | } | 458 | } |
diff --git a/OpenSim/Framework/Console/LogBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs index a2c4b3a..3f68e50 100644 --- a/OpenSim/Framework/Console/LogBase.cs +++ b/OpenSim/Framework/Console/ConsoleBase.cs | |||
@@ -33,61 +33,28 @@ using System.Net; | |||
33 | 33 | ||
34 | namespace OpenSim.Framework.Console | 34 | namespace OpenSim.Framework.Console |
35 | { | 35 | { |
36 | public enum LogPriority : int | 36 | public class ConsoleBase |
37 | { | 37 | { |
38 | CRITICAL, | 38 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
39 | HIGH, | ||
40 | MEDIUM, | ||
41 | NORMAL, | ||
42 | LOW, | ||
43 | VERBOSE, | ||
44 | EXTRAVERBOSE | ||
45 | } | ||
46 | 39 | ||
47 | public class LogBase | ||
48 | { | ||
49 | private object m_syncRoot = new object(); | 40 | private object m_syncRoot = new object(); |
50 | 41 | ||
51 | private StreamWriter Log; | 42 | public conscmd_callback m_cmdParser; |
52 | public conscmd_callback cmdparser; | 43 | public string m_componentName; |
53 | public string componentname; | ||
54 | private bool m_verbose; | ||
55 | 44 | ||
56 | public LogBase(string LogFile, string componentname, conscmd_callback cmdparser, bool verbose) | 45 | public ConsoleBase(string componentname, conscmd_callback cmdparser) |
57 | { | 46 | { |
58 | this.componentname = componentname; | 47 | m_componentName = componentname; |
59 | this.cmdparser = cmdparser; | 48 | m_cmdParser = cmdparser; |
60 | m_verbose = verbose; | ||
61 | System.Console.WriteLine("Creating new local console"); | ||
62 | |||
63 | if (String.IsNullOrEmpty(LogFile)) | ||
64 | { | ||
65 | LogFile = componentname + ".log"; | ||
66 | } | ||
67 | 49 | ||
68 | System.Console.WriteLine("Logs will be saved to current directory in " + LogFile); | 50 | System.Console.WriteLine("Creating new local console"); |
69 | 51 | ||
70 | try | 52 | m_log.Info("[" + m_componentName + "]: Started at " + DateTime.Now.ToString()); |
71 | { | ||
72 | Log = File.AppendText(LogFile); | ||
73 | } | ||
74 | catch (Exception ex) | ||
75 | { | ||
76 | System.Console.WriteLine("Unable to open log file. Do you already have another copy of OpenSim running? Permission problem?"); | ||
77 | System.Console.WriteLine(ex.Message); | ||
78 | System.Console.WriteLine(""); | ||
79 | System.Console.WriteLine("Application is terminating."); | ||
80 | System.Console.WriteLine(""); | ||
81 | System.Threading.Thread.CurrentThread.Abort(); | ||
82 | } | ||
83 | Log.WriteLine("========================================================================"); | ||
84 | Log.WriteLine(componentname + " Started at " + DateTime.Now.ToString()); | ||
85 | } | 53 | } |
86 | 54 | ||
87 | public void Close() | 55 | public void Close() |
88 | { | 56 | { |
89 | Log.WriteLine("Shutdown at " + DateTime.Now.ToString()); | 57 | m_log.Info("[" + m_componentName + "]: Shutdown at " + DateTime.Now.ToString()); |
90 | Log.Close(); | ||
91 | } | 58 | } |
92 | 59 | ||
93 | /// <summary> | 60 | /// <summary> |
@@ -99,23 +66,22 @@ namespace OpenSim.Framework.Console | |||
99 | /// <returns>an ansii color</returns> | 66 | /// <returns>an ansii color</returns> |
100 | private ConsoleColor DeriveColor(string input) | 67 | private ConsoleColor DeriveColor(string input) |
101 | { | 68 | { |
102 | int colIdx = (input.ToUpper().GetHashCode()%6) + 9; | 69 | int colIdx = (input.ToUpper().GetHashCode() % 6) + 9; |
103 | return (ConsoleColor) colIdx; | 70 | return (ConsoleColor) colIdx; |
104 | } | 71 | } |
105 | 72 | ||
106 | /// <summary> | 73 | /// <summary> |
107 | /// Sends a warning to the current log output | 74 | /// Sends a warning to the current console output |
108 | /// </summary> | 75 | /// </summary> |
109 | /// <param name="format">The message to send</param> | 76 | /// <param name="format">The message to send</param> |
110 | /// <param name="args">WriteLine-style message arguments</param> | 77 | /// <param name="args">WriteLine-style message arguments</param> |
111 | public void Warn(string format, params object[] args) | 78 | public void Warn(string format, params object[] args) |
112 | { | 79 | { |
113 | WriteNewLine(ConsoleColor.Yellow, format, args); | 80 | WriteNewLine(ConsoleColor.Yellow, format, args); |
114 | return; | ||
115 | } | 81 | } |
116 | 82 | ||
117 | /// <summary> | 83 | /// <summary> |
118 | /// Sends a warning to the current log output | 84 | /// Sends a warning to the current console output |
119 | /// </summary> | 85 | /// </summary> |
120 | /// <param name="sender">The module that sent this message</param> | 86 | /// <param name="sender">The module that sent this message</param> |
121 | /// <param name="format">The message to send</param> | 87 | /// <param name="format">The message to send</param> |
@@ -124,22 +90,20 @@ namespace OpenSim.Framework.Console | |||
124 | { | 90 | { |
125 | WritePrefixLine(DeriveColor(sender), sender); | 91 | WritePrefixLine(DeriveColor(sender), sender); |
126 | WriteNewLine(ConsoleColor.Yellow, format, args); | 92 | WriteNewLine(ConsoleColor.Yellow, format, args); |
127 | return; | ||
128 | } | 93 | } |
129 | 94 | ||
130 | /// <summary> | 95 | /// <summary> |
131 | /// Sends a notice to the current log output | 96 | /// Sends a notice to the current console output |
132 | /// </summary> | 97 | /// </summary> |
133 | /// <param name="format">The message to send</param> | 98 | /// <param name="format">The message to send</param> |
134 | /// <param name="args">WriteLine-style message arguments</param> | 99 | /// <param name="args">WriteLine-style message arguments</param> |
135 | public void Notice(string format, params object[] args) | 100 | public void Notice(string format, params object[] args) |
136 | { | 101 | { |
137 | WriteNewLine(ConsoleColor.White, format, args); | 102 | WriteNewLine(ConsoleColor.White, format, args); |
138 | return; | ||
139 | } | 103 | } |
140 | 104 | ||
141 | /// <summary> | 105 | /// <summary> |
142 | /// Sends a notice to the current log output | 106 | /// Sends a notice to the current console output |
143 | /// </summary> | 107 | /// </summary> |
144 | /// <param name="sender">The module that sent this message</param> | 108 | /// <param name="sender">The module that sent this message</param> |
145 | /// <param name="format">The message to send</param> | 109 | /// <param name="format">The message to send</param> |
@@ -148,22 +112,20 @@ namespace OpenSim.Framework.Console | |||
148 | { | 112 | { |
149 | WritePrefixLine(DeriveColor(sender), sender); | 113 | WritePrefixLine(DeriveColor(sender), sender); |
150 | WriteNewLine(ConsoleColor.White, format, args); | 114 | WriteNewLine(ConsoleColor.White, format, args); |
151 | return; | ||
152 | } | 115 | } |
153 | 116 | ||
154 | /// <summary> | 117 | /// <summary> |
155 | /// Sends an error to the current log output | 118 | /// Sends an error to the current console output |
156 | /// </summary> | 119 | /// </summary> |
157 | /// <param name="format">The message to send</param> | 120 | /// <param name="format">The message to send</param> |
158 | /// <param name="args">WriteLine-style message arguments</param> | 121 | /// <param name="args">WriteLine-style message arguments</param> |
159 | public void Error(string format, params object[] args) | 122 | public void Error(string format, params object[] args) |
160 | { | 123 | { |
161 | WriteNewLine(ConsoleColor.Red, format, args); | 124 | WriteNewLine(ConsoleColor.Red, format, args); |
162 | return; | ||
163 | } | 125 | } |
164 | 126 | ||
165 | /// <summary> | 127 | /// <summary> |
166 | /// Sends an error to the current log output | 128 | /// Sends an error to the current console output |
167 | /// </summary> | 129 | /// </summary> |
168 | /// <param name="sender">The module that sent this message</param> | 130 | /// <param name="sender">The module that sent this message</param> |
169 | /// <param name="format">The message to send</param> | 131 | /// <param name="format">The message to send</param> |
@@ -172,38 +134,20 @@ namespace OpenSim.Framework.Console | |||
172 | { | 134 | { |
173 | WritePrefixLine(DeriveColor(sender), sender); | 135 | WritePrefixLine(DeriveColor(sender), sender); |
174 | Error(format, args); | 136 | Error(format, args); |
175 | return; | ||
176 | } | 137 | } |
177 | 138 | ||
178 | /// <summary> | 139 | /// <summary> |
179 | /// Sends an informational message to the current log output | 140 | /// Sends a status message to the current console output |
180 | /// </summary> | ||
181 | /// <param name="sender">The module that sent this message</param> | ||
182 | /// <param name="format">The message to send</param> | ||
183 | /// <param name="args">WriteLine-style message arguments</param> | ||
184 | public void Verbose(string sender, string format, params object[] args) | ||
185 | { | ||
186 | if (m_verbose) | ||
187 | { | ||
188 | WritePrefixLine(DeriveColor(sender), sender); | ||
189 | WriteNewLine(ConsoleColor.Gray, format, args); | ||
190 | return; | ||
191 | } | ||
192 | } | ||
193 | |||
194 | /// <summary> | ||
195 | /// Sends a status message to the current log output | ||
196 | /// </summary> | 141 | /// </summary> |
197 | /// <param name="format">The message to send</param> | 142 | /// <param name="format">The message to send</param> |
198 | /// <param name="args">WriteLine-style message arguments</param> | 143 | /// <param name="args">WriteLine-style message arguments</param> |
199 | public void Status(string format, params object[] args) | 144 | public void Status(string format, params object[] args) |
200 | { | 145 | { |
201 | WriteNewLine(ConsoleColor.Blue, format, args); | 146 | WriteNewLine(ConsoleColor.Blue, format, args); |
202 | return; | ||
203 | } | 147 | } |
204 | 148 | ||
205 | /// <summary> | 149 | /// <summary> |
206 | /// Sends a status message to the current log output | 150 | /// Sends a status message to the current console output |
207 | /// </summary> | 151 | /// </summary> |
208 | /// <param name="sender">The module that sent this message</param> | 152 | /// <param name="sender">The module that sent this message</param> |
209 | /// <param name="format">The message to send</param> | 153 | /// <param name="format">The message to send</param> |
@@ -212,14 +156,12 @@ namespace OpenSim.Framework.Console | |||
212 | { | 156 | { |
213 | WritePrefixLine(DeriveColor(sender), sender); | 157 | WritePrefixLine(DeriveColor(sender), sender); |
214 | WriteNewLine(ConsoleColor.Blue, format, args); | 158 | WriteNewLine(ConsoleColor.Blue, format, args); |
215 | return; | ||
216 | } | 159 | } |
217 | 160 | ||
218 | [Conditional("DEBUG")] | 161 | [Conditional("DEBUG")] |
219 | public void Debug(string format, params object[] args) | 162 | public void Debug(string format, params object[] args) |
220 | { | 163 | { |
221 | WriteNewLine(ConsoleColor.Gray, format, args); | 164 | WriteNewLine(ConsoleColor.Gray, format, args); |
222 | return; | ||
223 | } | 165 | } |
224 | 166 | ||
225 | [Conditional("DEBUG")] | 167 | [Conditional("DEBUG")] |
@@ -227,7 +169,6 @@ namespace OpenSim.Framework.Console | |||
227 | { | 169 | { |
228 | WritePrefixLine(DeriveColor(sender), sender); | 170 | WritePrefixLine(DeriveColor(sender), sender); |
229 | WriteNewLine(ConsoleColor.Gray, format, args); | 171 | WriteNewLine(ConsoleColor.Gray, format, args); |
230 | return; | ||
231 | } | 172 | } |
232 | 173 | ||
233 | private void WriteNewLine(ConsoleColor color, string format, params object[] args) | 174 | private void WriteNewLine(ConsoleColor color, string format, params object[] args) |
@@ -236,19 +177,16 @@ namespace OpenSim.Framework.Console | |||
236 | { | 177 | { |
237 | lock (m_syncRoot) | 178 | lock (m_syncRoot) |
238 | { | 179 | { |
239 | string now = DateTime.Now.ToString("[MM-dd HH:mm:ss] "); | ||
240 | Log.Write(now); | ||
241 | try | 180 | try |
242 | { | 181 | { |
243 | Log.WriteLine(format, args); | 182 | System.Console.WriteLine(format, args); |
244 | Log.Flush(); | ||
245 | } | 183 | } |
246 | 184 | ||
247 | catch (FormatException) | 185 | catch (FormatException) |
248 | { | 186 | { |
249 | System.Console.WriteLine(args); | 187 | System.Console.WriteLine(args); |
250 | } | 188 | } |
251 | System.Console.Write(now); | 189 | |
252 | try | 190 | try |
253 | { | 191 | { |
254 | if (color != ConsoleColor.White) | 192 | if (color != ConsoleColor.White) |
@@ -267,13 +205,10 @@ namespace OpenSim.Framework.Console | |||
267 | // Some older systems dont support coloured text. | 205 | // Some older systems dont support coloured text. |
268 | System.Console.WriteLine(args); | 206 | System.Console.WriteLine(args); |
269 | } | 207 | } |
270 | |||
271 | return; | ||
272 | } | 208 | } |
273 | } | 209 | } |
274 | catch (ObjectDisposedException) | 210 | catch (ObjectDisposedException) |
275 | { | 211 | { |
276 | return; | ||
277 | } | 212 | } |
278 | } | 213 | } |
279 | 214 | ||
@@ -285,10 +220,7 @@ namespace OpenSim.Framework.Console | |||
285 | { | 220 | { |
286 | sender = sender.ToUpper(); | 221 | sender = sender.ToUpper(); |
287 | 222 | ||
288 | Log.WriteLine("[" + sender + "] "); | 223 | System.Console.WriteLine("[" + sender + "] "); |
289 | |||
290 | |||
291 | Log.Flush(); | ||
292 | 224 | ||
293 | System.Console.Write("["); | 225 | System.Console.Write("["); |
294 | 226 | ||
@@ -305,37 +237,29 @@ namespace OpenSim.Framework.Console | |||
305 | } | 237 | } |
306 | 238 | ||
307 | System.Console.Write("] \t"); | 239 | System.Console.Write("] \t"); |
308 | |||
309 | return; | ||
310 | } | 240 | } |
311 | } | 241 | } |
312 | catch (ObjectDisposedException) | 242 | catch (ObjectDisposedException) |
313 | { | 243 | { |
314 | return; | ||
315 | } | 244 | } |
316 | } | 245 | } |
317 | 246 | ||
318 | |||
319 | public string ReadLine() | 247 | public string ReadLine() |
320 | { | 248 | { |
321 | try | 249 | try |
322 | { | 250 | { |
323 | string TempStr = System.Console.ReadLine(); | 251 | return System.Console.ReadLine(); |
324 | Log.WriteLine(TempStr); | ||
325 | return TempStr; | ||
326 | } | 252 | } |
327 | catch (Exception e) | 253 | catch (Exception e) |
328 | { | 254 | { |
329 | MainLog.Instance.Error("Console", "System.Console.ReadLine exception " + e.ToString()); | 255 | m_log.Error("[Console]: System.Console.ReadLine exception " + e.ToString()); |
330 | return String.Empty; | 256 | return String.Empty; |
331 | } | 257 | } |
332 | } | 258 | } |
333 | 259 | ||
334 | public int Read() | 260 | public int Read() |
335 | { | 261 | { |
336 | int TempInt = System.Console.Read(); | 262 | return System.Console.Read(); |
337 | Log.Write((char) TempInt); | ||
338 | return TempInt; | ||
339 | } | 263 | } |
340 | 264 | ||
341 | public IPAddress CmdPromptIPAddress(string prompt, string defaultvalue) | 265 | public IPAddress CmdPromptIPAddress(string prompt, string defaultvalue) |
@@ -345,14 +269,14 @@ namespace OpenSim.Framework.Console | |||
345 | 269 | ||
346 | while (true) | 270 | while (true) |
347 | { | 271 | { |
348 | addressStr = MainLog.Instance.CmdPrompt(prompt, defaultvalue); | 272 | addressStr = CmdPrompt(prompt, defaultvalue); |
349 | if (IPAddress.TryParse(addressStr, out address)) | 273 | if (IPAddress.TryParse(addressStr, out address)) |
350 | { | 274 | { |
351 | break; | 275 | break; |
352 | } | 276 | } |
353 | else | 277 | else |
354 | { | 278 | { |
355 | MainLog.Instance.Error("Illegal address. Please re-enter."); | 279 | m_log.Error("Illegal address. Please re-enter."); |
356 | } | 280 | } |
357 | } | 281 | } |
358 | 282 | ||
@@ -366,7 +290,7 @@ namespace OpenSim.Framework.Console | |||
366 | 290 | ||
367 | while (true) | 291 | while (true) |
368 | { | 292 | { |
369 | portStr = MainLog.Instance.CmdPrompt(prompt, defaultvalue); | 293 | portStr = CmdPrompt(prompt, defaultvalue); |
370 | if (uint.TryParse(portStr, out port)) | 294 | if (uint.TryParse(portStr, out port)) |
371 | { | 295 | { |
372 | if (port >= IPEndPoint.MinPort && port <= IPEndPoint.MaxPort) | 296 | if (port >= IPEndPoint.MinPort && port <= IPEndPoint.MaxPort) |
@@ -375,7 +299,7 @@ namespace OpenSim.Framework.Console | |||
375 | } | 299 | } |
376 | } | 300 | } |
377 | 301 | ||
378 | MainLog.Instance.Error("Illegal address. Please re-enter."); | 302 | m_log.Error("Illegal address. Please re-enter."); |
379 | } | 303 | } |
380 | 304 | ||
381 | return port; | 305 | return port; |
@@ -386,8 +310,6 @@ namespace OpenSim.Framework.Console | |||
386 | public string PasswdPrompt(string prompt) | 310 | public string PasswdPrompt(string prompt) |
387 | { | 311 | { |
388 | // FIXME: Needs to be better abstracted | 312 | // FIXME: Needs to be better abstracted |
389 | Log.WriteLine(prompt); | ||
390 | Notice(prompt); | ||
391 | ConsoleColor oldfg = System.Console.ForegroundColor; | 313 | ConsoleColor oldfg = System.Console.ForegroundColor; |
392 | System.Console.ForegroundColor = System.Console.BackgroundColor; | 314 | System.Console.ForegroundColor = System.Console.BackgroundColor; |
393 | string temp = System.Console.ReadLine(); | 315 | string temp = System.Console.ReadLine(); |
@@ -398,7 +320,7 @@ namespace OpenSim.Framework.Console | |||
398 | // Displays a command prompt and waits for the user to enter a string, then returns that string | 320 | // Displays a command prompt and waits for the user to enter a string, then returns that string |
399 | public string CmdPrompt(string prompt) | 321 | public string CmdPrompt(string prompt) |
400 | { | 322 | { |
401 | Notice(String.Format("{0}: ", prompt)); | 323 | System.Console.WriteLine(String.Format("{0}: ", prompt)); |
402 | return ReadLine(); | 324 | return ReadLine(); |
403 | } | 325 | } |
404 | 326 | ||
@@ -429,7 +351,7 @@ namespace OpenSim.Framework.Console | |||
429 | } | 351 | } |
430 | else | 352 | else |
431 | { | 353 | { |
432 | Notice("Valid options are " + OptionA + " or " + OptionB); | 354 | System.Console.WriteLine("Valid options are " + OptionA + " or " + OptionB); |
433 | temp = CmdPrompt(prompt, defaultresponse); | 355 | temp = CmdPrompt(prompt, defaultresponse); |
434 | } | 356 | } |
435 | } | 357 | } |
@@ -439,23 +361,23 @@ namespace OpenSim.Framework.Console | |||
439 | // Runs a command with a number of parameters | 361 | // Runs a command with a number of parameters |
440 | public Object RunCmd(string Cmd, string[] cmdparams) | 362 | public Object RunCmd(string Cmd, string[] cmdparams) |
441 | { | 363 | { |
442 | cmdparser.RunCmd(Cmd, cmdparams); | 364 | m_cmdParser.RunCmd(Cmd, cmdparams); |
443 | return null; | 365 | return null; |
444 | } | 366 | } |
445 | 367 | ||
446 | // Shows data about something | 368 | // Shows data about something |
447 | public void ShowCommands(string ShowWhat) | 369 | public void ShowCommands(string ShowWhat) |
448 | { | 370 | { |
449 | cmdparser.Show(ShowWhat); | 371 | m_cmdParser.Show(ShowWhat); |
450 | } | 372 | } |
451 | 373 | ||
452 | public void MainLogPrompt() | 374 | public void Prompt() |
453 | { | 375 | { |
454 | string tempstr = CmdPrompt(componentname + "# "); | 376 | string tempstr = CmdPrompt(m_componentName + "# "); |
455 | MainLogRunCommand(tempstr); | 377 | RunCommand(tempstr); |
456 | } | 378 | } |
457 | 379 | ||
458 | public void MainLogRunCommand(string command) | 380 | public void RunCommand(string command) |
459 | { | 381 | { |
460 | string[] tempstrarray; | 382 | string[] tempstrarray; |
461 | tempstrarray = command.Split(' '); | 383 | tempstrarray = command.Split(' '); |
@@ -470,7 +392,7 @@ namespace OpenSim.Framework.Console | |||
470 | } | 392 | } |
471 | catch (Exception e) | 393 | catch (Exception e) |
472 | { | 394 | { |
473 | MainLog.Instance.Error("Console", "Command failed with exception " + e.ToString()); | 395 | m_log.Error("[Console]: Command failed with exception " + e.ToString()); |
474 | } | 396 | } |
475 | } | 397 | } |
476 | 398 | ||
diff --git a/OpenSim/Framework/Console/MainLog.cs b/OpenSim/Framework/Console/MainConsole.cs index bea2a22..fb88d04 100644 --- a/OpenSim/Framework/Console/MainLog.cs +++ b/OpenSim/Framework/Console/MainConsole.cs | |||
@@ -25,13 +25,14 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | |||
28 | namespace OpenSim.Framework.Console | 29 | namespace OpenSim.Framework.Console |
29 | { | 30 | { |
30 | public class MainLog | 31 | public class MainConsole |
31 | { | 32 | { |
32 | private static LogBase instance; | 33 | private static ConsoleBase instance; |
33 | 34 | ||
34 | public static LogBase Instance | 35 | public static ConsoleBase Instance |
35 | { | 36 | { |
36 | get { return instance; } | 37 | get { return instance; } |
37 | set { instance = value; } | 38 | set { instance = value; } |
diff --git a/OpenSim/Framework/Data.DB4o/DB4oUserData.cs b/OpenSim/Framework/Data.DB4o/DB4oUserData.cs index 6059cbe..35a3635 100644 --- a/OpenSim/Framework/Data.DB4o/DB4oUserData.cs +++ b/OpenSim/Framework/Data.DB4o/DB4oUserData.cs | |||
@@ -37,6 +37,8 @@ namespace OpenSim.Framework.Data.DB4o | |||
37 | /// </summary> | 37 | /// </summary> |
38 | public class DB4oUserData : IUserData | 38 | public class DB4oUserData : IUserData |
39 | { | 39 | { |
40 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | |||
40 | /// <summary> | 42 | /// <summary> |
41 | /// The database manager | 43 | /// The database manager |
42 | /// </summary> | 44 | /// </summary> |
@@ -143,22 +145,22 @@ namespace OpenSim.Framework.Data.DB4o | |||
143 | 145 | ||
144 | public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) | 146 | public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) |
145 | { | 147 | { |
146 | //MainLog.Instance.Verbose("FRIEND", "Stub AddNewUserFriend called"); | 148 | //m_log.Info("[FRIEND]: Stub AddNewUserFriend called"); |
147 | } | 149 | } |
148 | 150 | ||
149 | public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) | 151 | public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) |
150 | { | 152 | { |
151 | //MainLog.Instance.Verbose("FRIEND", "Stub RemoveUserFriend called"); | 153 | //m_log.Info("[FRIEND]: Stub RemoveUserFriend called"); |
152 | } | 154 | } |
153 | public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) | 155 | public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) |
154 | { | 156 | { |
155 | //MainLog.Instance.Verbose("FRIEND", "Stub UpdateUserFriendPerms called"); | 157 | //m_log.Info("[FRIEND]: Stub UpdateUserFriendPerms called"); |
156 | } | 158 | } |
157 | 159 | ||
158 | 160 | ||
159 | public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) | 161 | public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) |
160 | { | 162 | { |
161 | //MainLog.Instance.Verbose("FRIEND", "Stub GetUserFriendList called"); | 163 | //m_log.Info("[FRIEND]: Stub GetUserFriendList called"); |
162 | return new List<FriendListItem>(); | 164 | return new List<FriendListItem>(); |
163 | } | 165 | } |
164 | 166 | ||
@@ -166,7 +168,7 @@ namespace OpenSim.Framework.Data.DB4o | |||
166 | 168 | ||
167 | public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid) | 169 | public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid) |
168 | { | 170 | { |
169 | //MainLog.Instance.Verbose("USER", "Stub UpdateUserCUrrentRegion called"); | 171 | //m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called"); |
170 | } | 172 | } |
171 | 173 | ||
172 | 174 | ||
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLAssetData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLAssetData.cs index 08fbef0..4d5e4c7 100644 --- a/OpenSim/Framework/Data.MSSQL/MSSQLAssetData.cs +++ b/OpenSim/Framework/Data.MSSQL/MSSQLAssetData.cs | |||
@@ -37,6 +37,8 @@ namespace OpenSim.Framework.Data.MSSQL | |||
37 | { | 37 | { |
38 | internal class MSSQLAssetData : IAssetProvider | 38 | internal class MSSQLAssetData : IAssetProvider |
39 | { | 39 | { |
40 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | |||
40 | private MSSQLManager database; | 42 | private MSSQLManager database; |
41 | 43 | ||
42 | #region IAssetProvider Members | 44 | #region IAssetProvider Members |
@@ -46,7 +48,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
46 | // null as the version, indicates that the table didn't exist | 48 | // null as the version, indicates that the table didn't exist |
47 | if (tableName == null) | 49 | if (tableName == null) |
48 | { | 50 | { |
49 | MainLog.Instance.Notice("ASSETS", "Creating new database tables"); | 51 | m_log.Info("[ASSETS]: Creating new database tables"); |
50 | database.ExecuteResourceSql("CreateAssetsTable.sql"); | 52 | database.ExecuteResourceSql("CreateAssetsTable.sql"); |
51 | return; | 53 | return; |
52 | } | 54 | } |
@@ -164,7 +166,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
164 | } | 166 | } |
165 | catch (Exception e) | 167 | catch (Exception e) |
166 | { | 168 | { |
167 | MainLog.Instance.Error(e.ToString()); | 169 | m_log.Error(e.ToString()); |
168 | } | 170 | } |
169 | } | 171 | } |
170 | 172 | ||
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs index 7d228e6..28eec3e 100644 --- a/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs +++ b/OpenSim/Framework/Data.MSSQL/MSSQLGridData.cs | |||
@@ -40,6 +40,8 @@ namespace OpenSim.Framework.Data.MSSQL | |||
40 | /// </summary> | 40 | /// </summary> |
41 | public class SqlGridData : IGridData | 41 | public class SqlGridData : IGridData |
42 | { | 42 | { |
43 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
44 | |||
43 | /// <summary> | 45 | /// <summary> |
44 | /// Database manager | 46 | /// Database manager |
45 | /// </summary> | 47 | /// </summary> |
@@ -172,7 +174,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
172 | catch (Exception e) | 174 | catch (Exception e) |
173 | { | 175 | { |
174 | database.Reconnect(); | 176 | database.Reconnect(); |
175 | MainLog.Instance.Error(e.ToString()); | 177 | m_log.Error(e.ToString()); |
176 | return returnlist; | 178 | return returnlist; |
177 | } | 179 | } |
178 | } | 180 | } |
@@ -208,7 +210,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
208 | catch (Exception e) | 210 | catch (Exception e) |
209 | { | 211 | { |
210 | database.Reconnect(); | 212 | database.Reconnect(); |
211 | MainLog.Instance.Error(e.ToString()); | 213 | m_log.Error(e.ToString()); |
212 | return returnlist; | 214 | return returnlist; |
213 | } | 215 | } |
214 | } | 216 | } |
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs index 2e5d679..d79d369 100644 --- a/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs +++ b/OpenSim/Framework/Data.MSSQL/MSSQLInventoryData.cs | |||
@@ -39,6 +39,8 @@ namespace OpenSim.Framework.Data.MSSQL | |||
39 | /// </summary> | 39 | /// </summary> |
40 | public class MSSQLInventoryData : IInventoryData | 40 | public class MSSQLInventoryData : IInventoryData |
41 | { | 41 | { |
42 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
43 | |||
42 | /// <summary> | 44 | /// <summary> |
43 | /// The database manager | 45 | /// The database manager |
44 | /// </summary> | 46 | /// </summary> |
@@ -159,7 +161,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
159 | catch (Exception e) | 161 | catch (Exception e) |
160 | { | 162 | { |
161 | database.Reconnect(); | 163 | database.Reconnect(); |
162 | MainLog.Instance.Error(e.ToString()); | 164 | m_log.Error(e.ToString()); |
163 | return null; | 165 | return null; |
164 | } | 166 | } |
165 | } | 167 | } |
@@ -198,7 +200,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
198 | catch (Exception e) | 200 | catch (Exception e) |
199 | { | 201 | { |
200 | database.Reconnect(); | 202 | database.Reconnect(); |
201 | MainLog.Instance.Error(e.ToString()); | 203 | m_log.Error(e.ToString()); |
202 | return null; | 204 | return null; |
203 | } | 205 | } |
204 | } | 206 | } |
@@ -244,7 +246,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
244 | catch (Exception e) | 246 | catch (Exception e) |
245 | { | 247 | { |
246 | database.Reconnect(); | 248 | database.Reconnect(); |
247 | MainLog.Instance.Error(e.ToString()); | 249 | m_log.Error(e.ToString()); |
248 | return null; | 250 | return null; |
249 | } | 251 | } |
250 | } | 252 | } |
@@ -282,7 +284,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
282 | catch (Exception e) | 284 | catch (Exception e) |
283 | { | 285 | { |
284 | database.Reconnect(); | 286 | database.Reconnect(); |
285 | MainLog.Instance.Error(e.ToString()); | 287 | m_log.Error(e.ToString()); |
286 | return null; | 288 | return null; |
287 | } | 289 | } |
288 | } | 290 | } |
@@ -315,7 +317,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
315 | } | 317 | } |
316 | catch (SqlException e) | 318 | catch (SqlException e) |
317 | { | 319 | { |
318 | MainLog.Instance.Error(e.ToString()); | 320 | m_log.Error(e.ToString()); |
319 | } | 321 | } |
320 | 322 | ||
321 | return null; | 323 | return null; |
@@ -352,7 +354,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
352 | catch (Exception e) | 354 | catch (Exception e) |
353 | { | 355 | { |
354 | database.Reconnect(); | 356 | database.Reconnect(); |
355 | MainLog.Instance.Error(e.ToString()); | 357 | m_log.Error(e.ToString()); |
356 | } | 358 | } |
357 | return null; | 359 | return null; |
358 | } | 360 | } |
@@ -377,7 +379,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
377 | } | 379 | } |
378 | catch (Exception e) | 380 | catch (Exception e) |
379 | { | 381 | { |
380 | MainLog.Instance.Error(e.ToString()); | 382 | m_log.Error(e.ToString()); |
381 | } | 383 | } |
382 | 384 | ||
383 | return null; | 385 | return null; |
@@ -412,7 +414,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
412 | catch (Exception e) | 414 | catch (Exception e) |
413 | { | 415 | { |
414 | database.Reconnect(); | 416 | database.Reconnect(); |
415 | MainLog.Instance.Error(e.ToString()); | 417 | m_log.Error(e.ToString()); |
416 | return null; | 418 | return null; |
417 | } | 419 | } |
418 | } | 420 | } |
@@ -452,7 +454,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
452 | } | 454 | } |
453 | catch (SqlException e) | 455 | catch (SqlException e) |
454 | { | 456 | { |
455 | MainLog.Instance.Error(e.ToString()); | 457 | m_log.Error(e.ToString()); |
456 | } | 458 | } |
457 | } | 459 | } |
458 | 460 | ||
@@ -511,7 +513,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
511 | } | 513 | } |
512 | catch (Exception e) | 514 | catch (Exception e) |
513 | { | 515 | { |
514 | MainLog.Instance.Error(e.ToString()); | 516 | m_log.Error(e.ToString()); |
515 | } | 517 | } |
516 | } | 518 | } |
517 | 519 | ||
@@ -533,7 +535,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
533 | catch (SqlException e) | 535 | catch (SqlException e) |
534 | { | 536 | { |
535 | database.Reconnect(); | 537 | database.Reconnect(); |
536 | MainLog.Instance.Error(e.ToString()); | 538 | m_log.Error(e.ToString()); |
537 | } | 539 | } |
538 | } | 540 | } |
539 | 541 | ||
@@ -564,7 +566,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
564 | } | 566 | } |
565 | catch (Exception e) | 567 | catch (Exception e) |
566 | { | 568 | { |
567 | MainLog.Instance.Error(e.ToString()); | 569 | m_log.Error(e.ToString()); |
568 | } | 570 | } |
569 | } | 571 | } |
570 | 572 | ||
@@ -602,7 +604,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
602 | } | 604 | } |
603 | catch (Exception e) | 605 | catch (Exception e) |
604 | { | 606 | { |
605 | MainLog.Instance.Error(e.ToString()); | 607 | m_log.Error(e.ToString()); |
606 | } | 608 | } |
607 | } | 609 | } |
608 | 610 | ||
@@ -628,7 +630,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
628 | } | 630 | } |
629 | catch (Exception e) | 631 | catch (Exception e) |
630 | { | 632 | { |
631 | MainLog.Instance.Error(e.ToString()); | 633 | m_log.Error(e.ToString()); |
632 | } | 634 | } |
633 | } | 635 | } |
634 | 636 | ||
@@ -675,7 +677,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
675 | catch (SqlException e) | 677 | catch (SqlException e) |
676 | { | 678 | { |
677 | database.Reconnect(); | 679 | database.Reconnect(); |
678 | MainLog.Instance.Error(e.ToString()); | 680 | m_log.Error(e.ToString()); |
679 | } | 681 | } |
680 | } | 682 | } |
681 | 683 | ||
@@ -695,7 +697,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
695 | catch (SqlException e) | 697 | catch (SqlException e) |
696 | { | 698 | { |
697 | database.Reconnect(); | 699 | database.Reconnect(); |
698 | MainLog.Instance.Error(e.ToString()); | 700 | m_log.Error(e.ToString()); |
699 | } | 701 | } |
700 | } | 702 | } |
701 | 703 | ||
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs b/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs index 3a70909..e54cde1 100644 --- a/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs +++ b/OpenSim/Framework/Data.MSSQL/MSSQLManager.cs | |||
@@ -42,6 +42,8 @@ namespace OpenSim.Framework.Data.MSSQL | |||
42 | /// </summary> | 42 | /// </summary> |
43 | internal class MSSQLManager | 43 | internal class MSSQLManager |
44 | { | 44 | { |
45 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | |||
45 | /// <summary> | 47 | /// <summary> |
46 | /// The database connection object | 48 | /// The database connection object |
47 | /// </summary> | 49 | /// </summary> |
@@ -92,7 +94,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
92 | } | 94 | } |
93 | catch (Exception) | 95 | catch (Exception) |
94 | { | 96 | { |
95 | MainLog.Instance.Verbose("DATASTORE", "MSSQL Database doesn't exist... creating"); | 97 | m_log.Info("[DATASTORE]: MSSQL Database doesn't exist... creating"); |
96 | InitDB(conn); | 98 | InitDB(conn); |
97 | } | 99 | } |
98 | cmd = Query("select top 1 webLoginKey from users", new Dictionary<string, string>()); | 100 | cmd = Query("select top 1 webLoginKey from users", new Dictionary<string, string>()); |
@@ -260,7 +262,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
260 | } | 262 | } |
261 | catch (Exception e) | 263 | catch (Exception e) |
262 | { | 264 | { |
263 | MainLog.Instance.Error("Unable to reconnect to database " + e.ToString()); | 265 | m_log.Error("Unable to reconnect to database " + e.ToString()); |
264 | } | 266 | } |
265 | } | 267 | } |
266 | } | 268 | } |
@@ -529,7 +531,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
529 | } | 531 | } |
530 | catch (Exception e) | 532 | catch (Exception e) |
531 | { | 533 | { |
532 | MainLog.Instance.Error("MSSQLManager : " + e.ToString()); | 534 | m_log.Error("MSSQLManager : " + e.ToString()); |
533 | } | 535 | } |
534 | 536 | ||
535 | return returnval; | 537 | return returnval; |
@@ -573,7 +575,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
573 | } | 575 | } |
574 | catch (Exception e) | 576 | catch (Exception e) |
575 | { | 577 | { |
576 | MainLog.Instance.Error(e.ToString()); | 578 | m_log.Error(e.ToString()); |
577 | return false; | 579 | return false; |
578 | } | 580 | } |
579 | 581 | ||
@@ -667,7 +669,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
667 | } | 669 | } |
668 | catch (Exception e) | 670 | catch (Exception e) |
669 | { | 671 | { |
670 | MainLog.Instance.Error(e.ToString()); | 672 | m_log.Error(e.ToString()); |
671 | return false; | 673 | return false; |
672 | } | 674 | } |
673 | 675 | ||
@@ -688,7 +690,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
688 | } | 690 | } |
689 | catch (Exception e) | 691 | catch (Exception e) |
690 | { | 692 | { |
691 | MainLog.Instance.Error("Unable to execute query " + e.ToString()); | 693 | m_log.Error("Unable to execute query " + e.ToString()); |
692 | } | 694 | } |
693 | } | 695 | } |
694 | 696 | ||
@@ -721,7 +723,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
721 | } | 723 | } |
722 | catch (Exception e) | 724 | catch (Exception e) |
723 | { | 725 | { |
724 | MainLog.Instance.Error(e.ToString()); | 726 | m_log.Error(e.ToString()); |
725 | } | 727 | } |
726 | } | 728 | } |
727 | tables.Close(); | 729 | tables.Close(); |
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs index aa0526c..ed9929c 100644 --- a/OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs +++ b/OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs | |||
@@ -39,6 +39,8 @@ namespace OpenSim.Framework.Data.MSSQL | |||
39 | /// </summary> | 39 | /// </summary> |
40 | internal class MSSQLUserData : IUserData | 40 | internal class MSSQLUserData : IUserData |
41 | { | 41 | { |
42 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
43 | |||
42 | /// <summary> | 44 | /// <summary> |
43 | /// Database manager for MySQL | 45 | /// Database manager for MySQL |
44 | /// </summary> | 46 | /// </summary> |
@@ -94,7 +96,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
94 | catch (Exception e) | 96 | catch (Exception e) |
95 | { | 97 | { |
96 | database.Reconnect(); | 98 | database.Reconnect(); |
97 | MainLog.Instance.Error(e.ToString()); | 99 | m_log.Error(e.ToString()); |
98 | return null; | 100 | return null; |
99 | } | 101 | } |
100 | } | 102 | } |
@@ -103,22 +105,22 @@ namespace OpenSim.Framework.Data.MSSQL | |||
103 | 105 | ||
104 | public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) | 106 | public void AddNewUserFriend(LLUUID friendlistowner, LLUUID friend, uint perms) |
105 | { | 107 | { |
106 | MainLog.Instance.Verbose("FRIEND", "Stub AddNewUserFriend called"); | 108 | m_log.Info("[FRIEND]: Stub AddNewUserFriend called"); |
107 | } | 109 | } |
108 | 110 | ||
109 | public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) | 111 | public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) |
110 | { | 112 | { |
111 | MainLog.Instance.Verbose("FRIEND", "Stub RemoveUserFriend called"); | 113 | m_log.Info("[FRIEND]: Stub RemoveUserFriend called"); |
112 | } | 114 | } |
113 | public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) | 115 | public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) |
114 | { | 116 | { |
115 | MainLog.Instance.Verbose("FRIEND", "Stub UpdateUserFriendPerms called"); | 117 | m_log.Info("[FRIEND]: Stub UpdateUserFriendPerms called"); |
116 | } | 118 | } |
117 | 119 | ||
118 | 120 | ||
119 | public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) | 121 | public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) |
120 | { | 122 | { |
121 | MainLog.Instance.Verbose("FRIEND", "Stub GetUserFriendList called"); | 123 | m_log.Info("[FRIEND]: Stub GetUserFriendList called"); |
122 | return new List<FriendListItem>(); | 124 | return new List<FriendListItem>(); |
123 | } | 125 | } |
124 | 126 | ||
@@ -126,7 +128,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
126 | 128 | ||
127 | public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid) | 129 | public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid) |
128 | { | 130 | { |
129 | MainLog.Instance.Verbose("USER", "Stub UpdateUserCUrrentRegion called"); | 131 | m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called"); |
130 | } | 132 | } |
131 | 133 | ||
132 | 134 | ||
@@ -168,7 +170,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
168 | catch (Exception e) | 170 | catch (Exception e) |
169 | { | 171 | { |
170 | database.Reconnect(); | 172 | database.Reconnect(); |
171 | MainLog.Instance.Error(e.ToString()); | 173 | m_log.Error(e.ToString()); |
172 | return returnlist; | 174 | return returnlist; |
173 | } | 175 | } |
174 | } | 176 | } |
@@ -204,7 +206,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
204 | catch (Exception e) | 206 | catch (Exception e) |
205 | { | 207 | { |
206 | database.Reconnect(); | 208 | database.Reconnect(); |
207 | MainLog.Instance.Error(e.ToString()); | 209 | m_log.Error(e.ToString()); |
208 | return returnlist; | 210 | return returnlist; |
209 | } | 211 | } |
210 | } | 212 | } |
@@ -235,7 +237,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
235 | catch (Exception e) | 237 | catch (Exception e) |
236 | { | 238 | { |
237 | database.Reconnect(); | 239 | database.Reconnect(); |
238 | MainLog.Instance.Error(e.ToString()); | 240 | m_log.Error(e.ToString()); |
239 | return null; | 241 | return null; |
240 | } | 242 | } |
241 | } | 243 | } |
@@ -290,7 +292,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
290 | catch (Exception e) | 292 | catch (Exception e) |
291 | { | 293 | { |
292 | database.Reconnect(); | 294 | database.Reconnect(); |
293 | MainLog.Instance.Error(e.ToString()); | 295 | m_log.Error(e.ToString()); |
294 | return null; | 296 | return null; |
295 | } | 297 | } |
296 | } | 298 | } |
@@ -324,7 +326,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
324 | catch (Exception e) | 326 | catch (Exception e) |
325 | { | 327 | { |
326 | database.Reconnect(); | 328 | database.Reconnect(); |
327 | MainLog.Instance.Error(e.ToString()); | 329 | m_log.Error(e.ToString()); |
328 | } | 330 | } |
329 | } | 331 | } |
330 | 332 | ||
@@ -426,7 +428,7 @@ namespace OpenSim.Framework.Data.MSSQL | |||
426 | } | 428 | } |
427 | catch (Exception e) | 429 | catch (Exception e) |
428 | { | 430 | { |
429 | MainLog.Instance.Error(e.ToString()); | 431 | m_log.Error(e.ToString()); |
430 | } | 432 | } |
431 | return false; | 433 | return false; |
432 | } | 434 | } |
diff --git a/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs b/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs index 407d6d2..f9ef699 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLAssetData.cs | |||
@@ -37,6 +37,8 @@ namespace OpenSim.Framework.Data.MySQL | |||
37 | { | 37 | { |
38 | internal class MySQLAssetData : IAssetProvider | 38 | internal class MySQLAssetData : IAssetProvider |
39 | { | 39 | { |
40 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | |||
40 | private MySQLManager _dbConnection; | 42 | private MySQLManager _dbConnection; |
41 | 43 | ||
42 | #region IAssetProvider Members | 44 | #region IAssetProvider Members |
@@ -46,7 +48,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
46 | // null as the version, indicates that the table didn't exist | 48 | // null as the version, indicates that the table didn't exist |
47 | if (oldVersion == null) | 49 | if (oldVersion == null) |
48 | { | 50 | { |
49 | MainLog.Instance.Notice("ASSETS", "Creating new database tables"); | 51 | m_log.Info("[ASSETS]: Creating new database tables"); |
50 | _dbConnection.ExecuteResourceSql("CreateAssetsTable.sql"); | 52 | _dbConnection.ExecuteResourceSql("CreateAssetsTable.sql"); |
51 | return; | 53 | return; |
52 | } | 54 | } |
@@ -98,9 +100,9 @@ namespace OpenSim.Framework.Data.MySQL | |||
98 | } | 100 | } |
99 | catch (Exception e) | 101 | catch (Exception e) |
100 | { | 102 | { |
101 | MainLog.Instance.Error( | 103 | m_log.Error(String.Format( |
102 | "ASSETS", "MySql failure fetching asset {0}" + Environment.NewLine + e.ToString() | 104 | "[ASSETS]: MySql failure fetching asset {0}" + Environment.NewLine + e.ToString() |
103 | + Environment.NewLine + "Attempting reconnection", assetID); | 105 | + Environment.NewLine + "Attempting reconnection", assetID)); |
104 | _dbConnection.Reconnect(); | 106 | _dbConnection.Reconnect(); |
105 | } | 107 | } |
106 | } | 108 | } |
@@ -137,10 +139,10 @@ namespace OpenSim.Framework.Data.MySQL | |||
137 | } | 139 | } |
138 | catch (Exception e) | 140 | catch (Exception e) |
139 | { | 141 | { |
140 | MainLog.Instance.Error( | 142 | m_log.Error(String.Format( |
141 | "ASSETS", | 143 | "[ASSETS]: " + |
142 | "MySql failure creating asset {0} with name {1}" + Environment.NewLine + e.ToString() | 144 | "MySql failure creating asset {0} with name {1}" + Environment.NewLine + e.ToString() |
143 | + Environment.NewLine + "Attempting reconnection", asset.FullID, asset.Name); | 145 | + Environment.NewLine + "Attempting reconnection", asset.FullID, asset.Name)); |
144 | _dbConnection.Reconnect(); | 146 | _dbConnection.Reconnect(); |
145 | } | 147 | } |
146 | } | 148 | } |
diff --git a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs index 54f39bb..e2ea018 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs | |||
@@ -42,6 +42,8 @@ namespace OpenSim.Framework.Data.MySQL | |||
42 | { | 42 | { |
43 | public class MySQLDataStore : IRegionDataStore | 43 | public class MySQLDataStore : IRegionDataStore |
44 | { | 44 | { |
45 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | |||
45 | private const string m_primSelect = "select * from prims"; | 47 | private const string m_primSelect = "select * from prims"; |
46 | private const string m_shapeSelect = "select * from primshapes"; | 48 | private const string m_shapeSelect = "select * from primshapes"; |
47 | private const string m_itemsSelect = "select * from primitems"; | 49 | private const string m_itemsSelect = "select * from primitems"; |
@@ -80,7 +82,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
80 | m_dataSet = new DataSet(); | 82 | m_dataSet = new DataSet(); |
81 | this.persistPrimInventories = persistPrimInventories; | 83 | this.persistPrimInventories = persistPrimInventories; |
82 | 84 | ||
83 | MainLog.Instance.Verbose("DATASTORE", "MySql - connecting: " + connectionstring); | 85 | m_log.Info("[DATASTORE]: MySql - connecting: " + connectionstring); |
84 | m_connection = new MySqlConnection(connectionstring); | 86 | m_connection = new MySqlConnection(connectionstring); |
85 | 87 | ||
86 | MySqlCommand primSelectCmd = new MySqlCommand(m_primSelect, m_connection); | 88 | MySqlCommand primSelectCmd = new MySqlCommand(m_primSelect, m_connection); |
@@ -148,12 +150,12 @@ namespace OpenSim.Framework.Data.MySQL | |||
148 | { | 150 | { |
149 | if ((prim.ObjectFlags & (uint) LLObject.ObjectFlags.Physics) == 0) | 151 | if ((prim.ObjectFlags & (uint) LLObject.ObjectFlags.Physics) == 0) |
150 | { | 152 | { |
151 | MainLog.Instance.Verbose("DATASTORE", "Adding obj: " + obj.UUID + " to region: " + regionUUID); | 153 | m_log.Info("[DATASTORE]: Adding obj: " + obj.UUID + " to region: " + regionUUID); |
152 | addPrim(prim, obj.UUID, regionUUID); | 154 | addPrim(prim, obj.UUID, regionUUID); |
153 | } | 155 | } |
154 | else | 156 | else |
155 | { | 157 | { |
156 | // MainLog.Instance.Verbose("DATASTORE", "Ignoring Physical obj: " + obj.UUID + " in region: " + regionUUID); | 158 | // m_log.Info("[DATASTORE]: Ignoring Physical obj: " + obj.UUID + " in region: " + regionUUID); |
157 | } | 159 | } |
158 | } | 160 | } |
159 | } | 161 | } |
@@ -163,7 +165,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
163 | 165 | ||
164 | public void RemoveObject(LLUUID obj, LLUUID regionUUID) | 166 | public void RemoveObject(LLUUID obj, LLUUID regionUUID) |
165 | { | 167 | { |
166 | MainLog.Instance.Verbose("DATASTORE", "Removing obj: {0} from region: {1}", obj.UUID, regionUUID); | 168 | m_log.Info(String.Format("[DATASTORE]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID)); |
167 | 169 | ||
168 | DataTable prims = m_primTable; | 170 | DataTable prims = m_primTable; |
169 | DataTable shapes = m_shapeTable; | 171 | DataTable shapes = m_shapeTable; |
@@ -228,7 +230,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
228 | lock (m_dataSet) | 230 | lock (m_dataSet) |
229 | { | 231 | { |
230 | DataRow[] primsForRegion = prims.Select(byRegion, orderByParent); | 232 | DataRow[] primsForRegion = prims.Select(byRegion, orderByParent); |
231 | MainLog.Instance.Verbose("DATASTORE", | 233 | m_log.Info("[DATASTORE]: " + |
232 | "Loaded " + primsForRegion.Length + " prims for region: " + regionUUID); | 234 | "Loaded " + primsForRegion.Length + " prims for region: " + regionUUID); |
233 | 235 | ||
234 | foreach (DataRow primRow in primsForRegion) | 236 | foreach (DataRow primRow in primsForRegion) |
@@ -251,7 +253,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
251 | } | 253 | } |
252 | else | 254 | else |
253 | { | 255 | { |
254 | MainLog.Instance.Notice( | 256 | m_log.Info( |
255 | "No shape found for prim in storage, so setting default box shape"); | 257 | "No shape found for prim in storage, so setting default box shape"); |
256 | prim.Shape = PrimitiveBaseShape.Default; | 258 | prim.Shape = PrimitiveBaseShape.Default; |
257 | } | 259 | } |
@@ -270,7 +272,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
270 | } | 272 | } |
271 | else | 273 | else |
272 | { | 274 | { |
273 | MainLog.Instance.Notice( | 275 | m_log.Info( |
274 | "No shape found for prim in storage, so setting default box shape"); | 276 | "No shape found for prim in storage, so setting default box shape"); |
275 | prim.Shape = PrimitiveBaseShape.Default; | 277 | prim.Shape = PrimitiveBaseShape.Default; |
276 | } | 278 | } |
@@ -284,11 +286,11 @@ namespace OpenSim.Framework.Data.MySQL | |||
284 | } | 286 | } |
285 | catch (Exception e) | 287 | catch (Exception e) |
286 | { | 288 | { |
287 | MainLog.Instance.Error("DATASTORE", "Failed create prim object, exception and data follows"); | 289 | m_log.Error("[DATASTORE]: Failed create prim object, exception and data follows"); |
288 | MainLog.Instance.Verbose("DATASTORE", e.ToString()); | 290 | m_log.Info("[DATASTORE]: " + e.ToString()); |
289 | foreach (DataColumn col in prims.Columns) | 291 | foreach (DataColumn col in prims.Columns) |
290 | { | 292 | { |
291 | MainLog.Instance.Verbose("DATASTORE", "Col: " + col.ColumnName + " => " + primRow[col]); | 293 | m_log.Info("[DATASTORE]: Col: " + col.ColumnName + " => " + primRow[col]); |
292 | } | 294 | } |
293 | } | 295 | } |
294 | } | 296 | } |
@@ -302,7 +304,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
302 | /// <param name="prim"></param> | 304 | /// <param name="prim"></param> |
303 | private void LoadItems(SceneObjectPart prim) | 305 | private void LoadItems(SceneObjectPart prim) |
304 | { | 306 | { |
305 | //MainLog.Instance.Verbose("DATASTORE", "Loading inventory for {0}, {1}", prim.Name, prim.UUID); | 307 | //m_log.Info(String.Format("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID)); |
306 | 308 | ||
307 | DataTable dbItems = m_itemsTable; | 309 | DataTable dbItems = m_itemsTable; |
308 | 310 | ||
@@ -316,7 +318,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
316 | TaskInventoryItem item = buildItem(row); | 318 | TaskInventoryItem item = buildItem(row); |
317 | inventory.Add(item); | 319 | inventory.Add(item); |
318 | 320 | ||
319 | MainLog.Instance.Verbose("DATASTORE", "Restored item {0}, {1}", item.Name, item.ItemID); | 321 | m_log.Info(String.Format("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID)); |
320 | } | 322 | } |
321 | 323 | ||
322 | prim.RestoreInventoryItems(inventory); | 324 | prim.RestoreInventoryItems(inventory); |
@@ -332,7 +334,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
332 | public void StoreTerrain(double[,] ter, LLUUID regionID) | 334 | public void StoreTerrain(double[,] ter, LLUUID regionID) |
333 | { | 335 | { |
334 | int revision = Util.UnixTimeSinceEpoch(); | 336 | int revision = Util.UnixTimeSinceEpoch(); |
335 | MainLog.Instance.Verbose("DATASTORE", "Storing terrain revision r" + revision.ToString()); | 337 | m_log.Info("[DATASTORE]: Storing terrain revision r" + revision.ToString()); |
336 | 338 | ||
337 | DataTable terrain = m_dataSet.Tables["terrain"]; | 339 | DataTable terrain = m_dataSet.Tables["terrain"]; |
338 | lock (m_dataSet) | 340 | lock (m_dataSet) |
@@ -384,11 +386,11 @@ namespace OpenSim.Framework.Data.MySQL | |||
384 | } | 386 | } |
385 | else | 387 | else |
386 | { | 388 | { |
387 | MainLog.Instance.Verbose("DATASTORE", "No terrain found for region"); | 389 | m_log.Info("[DATASTORE]: No terrain found for region"); |
388 | return null; | 390 | return null; |
389 | } | 391 | } |
390 | 392 | ||
391 | MainLog.Instance.Verbose("DATASTORE", "Loaded terrain revision r" + rev.ToString()); | 393 | m_log.Info("[DATASTORE]: Loaded terrain revision r" + rev.ToString()); |
392 | } | 394 | } |
393 | 395 | ||
394 | return terret; | 396 | return terret; |
@@ -418,7 +420,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
418 | public void StoreLandObject(Land parcel, LLUUID regionUUID) | 420 | public void StoreLandObject(Land parcel, LLUUID regionUUID) |
419 | { | 421 | { |
420 | // Does the new locking fix it? | 422 | // Does the new locking fix it? |
421 | MainLog.Instance.Verbose("DATASTORE", "Tedds temp fix: Waiting 3 seconds for stuff to catch up. (Someone please fix! :))"); | 423 | m_log.Info("[DATASTORE]: Tedds temp fix: Waiting 3 seconds for stuff to catch up. (Someone please fix! :))"); |
422 | System.Threading.Thread.Sleep(2500 + rnd.Next(300, 900)); | 424 | System.Threading.Thread.Sleep(2500 + rnd.Next(300, 900)); |
423 | 425 | ||
424 | lock (m_dataSet) | 426 | lock (m_dataSet) |
@@ -1214,7 +1216,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
1214 | if (!persistPrimInventories) | 1216 | if (!persistPrimInventories) |
1215 | return; | 1217 | return; |
1216 | 1218 | ||
1217 | MainLog.Instance.Verbose("DATASTORE", "Persisting Prim Inventory with prim ID {0}", primID); | 1219 | m_log.Info(String.Format("[DATASTORE]: Persisting Prim Inventory with prim ID {0}", primID)); |
1218 | 1220 | ||
1219 | // For now, we're just going to crudely remove all the previous inventory items | 1221 | // For now, we're just going to crudely remove all the previous inventory items |
1220 | // no matter whether they have changed or not, and replace them with the current set. | 1222 | // no matter whether they have changed or not, and replace them with the current set. |
@@ -1225,10 +1227,10 @@ namespace OpenSim.Framework.Data.MySQL | |||
1225 | // repalce with current inventory details | 1227 | // repalce with current inventory details |
1226 | foreach (TaskInventoryItem newItem in items) | 1228 | foreach (TaskInventoryItem newItem in items) |
1227 | { | 1229 | { |
1228 | // MainLog.Instance.Verbose( | 1230 | // m_log.Info(String.Format( |
1229 | // "DATASTORE", | 1231 | // "[DATASTORE]: " + |
1230 | // "Adding item {0}, {1} to prim ID {2}", | 1232 | // "Adding item {0}, {1} to prim ID {2}", |
1231 | // newItem.Name, newItem.ItemID, newItem.ParentPartID); | 1233 | // newItem.Name, newItem.ItemID, newItem.ParentPartID)); |
1232 | 1234 | ||
1233 | DataRow newItemRow = m_itemsTable.NewRow(); | 1235 | DataRow newItemRow = m_itemsTable.NewRow(); |
1234 | fillItemRow(newItemRow, newItem); | 1236 | fillItemRow(newItemRow, newItem); |
@@ -1332,7 +1334,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
1332 | sql += subsql; | 1334 | sql += subsql; |
1333 | sql += ")"; | 1335 | sql += ")"; |
1334 | 1336 | ||
1335 | //MainLog.Instance.Verbose("DATASTORE", "defineTable() sql {0}", sql); | 1337 | //m_log.Info(String.Format("[DATASTORE]: defineTable() sql {0}", sql)); |
1336 | 1338 | ||
1337 | return sql; | 1339 | return sql; |
1338 | } | 1340 | } |
@@ -1463,8 +1465,8 @@ namespace OpenSim.Framework.Data.MySQL | |||
1463 | } | 1465 | } |
1464 | catch (Exception ex) | 1466 | catch (Exception ex) |
1465 | { | 1467 | { |
1466 | MainLog.Instance.Error("MySql", "Error connecting to MySQL server: " + ex.Message); | 1468 | m_log.Error("[MySql]: Error connecting to MySQL server: " + ex.Message); |
1467 | MainLog.Instance.Error("MySql", "Application is terminating!"); | 1469 | m_log.Error("[MySql]: Application is terminating!"); |
1468 | System.Threading.Thread.CurrentThread.Abort(); | 1470 | System.Threading.Thread.CurrentThread.Abort(); |
1469 | } | 1471 | } |
1470 | } | 1472 | } |
@@ -1475,7 +1477,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
1475 | } | 1477 | } |
1476 | catch (MySqlException e) | 1478 | catch (MySqlException e) |
1477 | { | 1479 | { |
1478 | MainLog.Instance.Warn("MySql", "Primitives Table Already Exists: {0}", e); | 1480 | m_log.Warn(String.Format("[MySql]: Primitives Table Already Exists: {0}", e)); |
1479 | } | 1481 | } |
1480 | 1482 | ||
1481 | try | 1483 | try |
@@ -1484,7 +1486,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
1484 | } | 1486 | } |
1485 | catch (MySqlException e) | 1487 | catch (MySqlException e) |
1486 | { | 1488 | { |
1487 | MainLog.Instance.Warn("MySql", "Shapes Table Already Exists: {0}", e); | 1489 | m_log.Warn(String.Format("[MySql]: Shapes Table Already Exists: {0}", e)); |
1488 | } | 1490 | } |
1489 | 1491 | ||
1490 | try | 1492 | try |
@@ -1493,7 +1495,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
1493 | } | 1495 | } |
1494 | catch (MySqlException e) | 1496 | catch (MySqlException e) |
1495 | { | 1497 | { |
1496 | MainLog.Instance.Warn("MySql", "Items Table Already Exists: {0}", e); | 1498 | m_log.Warn(String.Format("[MySql]: Items Table Already Exists: {0}", e)); |
1497 | } | 1499 | } |
1498 | 1500 | ||
1499 | try | 1501 | try |
@@ -1502,7 +1504,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
1502 | } | 1504 | } |
1503 | catch (MySqlException e) | 1505 | catch (MySqlException e) |
1504 | { | 1506 | { |
1505 | MainLog.Instance.Warn("MySql", "Terrain Table Already Exists: {0}", e); | 1507 | m_log.Warn(String.Format("[MySql]: Terrain Table Already Exists: {0}", e)); |
1506 | } | 1508 | } |
1507 | 1509 | ||
1508 | try | 1510 | try |
@@ -1511,7 +1513,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
1511 | } | 1513 | } |
1512 | catch (MySqlException e) | 1514 | catch (MySqlException e) |
1513 | { | 1515 | { |
1514 | MainLog.Instance.Warn("MySql", "Land Table Already Exists: {0}", e); | 1516 | m_log.Warn(String.Format("[MySql]: Land Table Already Exists: {0}", e)); |
1515 | } | 1517 | } |
1516 | 1518 | ||
1517 | try | 1519 | try |
@@ -1520,7 +1522,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
1520 | } | 1522 | } |
1521 | catch (MySqlException e) | 1523 | catch (MySqlException e) |
1522 | { | 1524 | { |
1523 | MainLog.Instance.Warn("MySql", "LandAccessList Table Already Exists: {0}", e); | 1525 | m_log.Warn(String.Format("[MySql]: LandAccessList Table Already Exists: {0}", e)); |
1524 | } | 1526 | } |
1525 | conn.Close(); | 1527 | conn.Close(); |
1526 | } | 1528 | } |
@@ -1555,7 +1557,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
1555 | } | 1557 | } |
1556 | catch (MySqlException) | 1558 | catch (MySqlException) |
1557 | { | 1559 | { |
1558 | MainLog.Instance.Verbose("DATASTORE", "MySql Database doesn't exist... creating"); | 1560 | m_log.Info("[DATASTORE]: MySql Database doesn't exist... creating"); |
1559 | InitDB(conn); | 1561 | InitDB(conn); |
1560 | } | 1562 | } |
1561 | 1563 | ||
@@ -1573,7 +1575,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
1573 | { | 1575 | { |
1574 | if (!tmpDS.Tables["prims"].Columns.Contains(col.ColumnName)) | 1576 | if (!tmpDS.Tables["prims"].Columns.Contains(col.ColumnName)) |
1575 | { | 1577 | { |
1576 | MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName); | 1578 | m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName); |
1577 | return false; | 1579 | return false; |
1578 | } | 1580 | } |
1579 | } | 1581 | } |
@@ -1582,7 +1584,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
1582 | { | 1584 | { |
1583 | if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName)) | 1585 | if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName)) |
1584 | { | 1586 | { |
1585 | MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName); | 1587 | m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName); |
1586 | return false; | 1588 | return false; |
1587 | } | 1589 | } |
1588 | } | 1590 | } |
@@ -1593,7 +1595,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
1593 | { | 1595 | { |
1594 | if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName)) | 1596 | if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName)) |
1595 | { | 1597 | { |
1596 | MainLog.Instance.Verbose("DATASTORE", "Missing require column:" + col.ColumnName); | 1598 | m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName); |
1597 | return false; | 1599 | return false; |
1598 | } | 1600 | } |
1599 | } | 1601 | } |
@@ -1602,7 +1604,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
1602 | { | 1604 | { |
1603 | if (!tmpDS.Tables["land"].Columns.Contains(col.ColumnName)) | 1605 | if (!tmpDS.Tables["land"].Columns.Contains(col.ColumnName)) |
1604 | { | 1606 | { |
1605 | MainLog.Instance.Verbose("DATASTORE", "Missing require column:" + col.ColumnName); | 1607 | m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName); |
1606 | return false; | 1608 | return false; |
1607 | } | 1609 | } |
1608 | } | 1610 | } |
@@ -1611,7 +1613,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
1611 | { | 1613 | { |
1612 | if (!tmpDS.Tables["landaccesslist"].Columns.Contains(col.ColumnName)) | 1614 | if (!tmpDS.Tables["landaccesslist"].Columns.Contains(col.ColumnName)) |
1613 | { | 1615 | { |
1614 | MainLog.Instance.Verbose("DATASTORE", "Missing require column:" + col.ColumnName); | 1616 | m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName); |
1615 | return false; | 1617 | return false; |
1616 | } | 1618 | } |
1617 | } | 1619 | } |
diff --git a/OpenSim/Framework/Data.MySQL/MySQLGridData.cs b/OpenSim/Framework/Data.MySQL/MySQLGridData.cs index c8c4ab0..d62c286 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLGridData.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLGridData.cs | |||
@@ -42,6 +42,8 @@ namespace OpenSim.Framework.Data.MySQL | |||
42 | /// </summary> | 42 | /// </summary> |
43 | public class MySQLGridData : IGridData | 43 | public class MySQLGridData : IGridData |
44 | { | 44 | { |
45 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | |||
45 | /// <summary> | 47 | /// <summary> |
46 | /// MySQL Database Manager | 48 | /// MySQL Database Manager |
47 | /// </summary> | 49 | /// </summary> |
@@ -168,7 +170,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
168 | catch (Exception e) | 170 | catch (Exception e) |
169 | { | 171 | { |
170 | database.Reconnect(); | 172 | database.Reconnect(); |
171 | MainLog.Instance.Error(e.ToString()); | 173 | m_log.Error(e.ToString()); |
172 | return null; | 174 | return null; |
173 | } | 175 | } |
174 | } | 176 | } |
@@ -200,7 +202,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
200 | catch (Exception e) | 202 | catch (Exception e) |
201 | { | 203 | { |
202 | database.Reconnect(); | 204 | database.Reconnect(); |
203 | MainLog.Instance.Error(e.ToString()); | 205 | m_log.Error(e.ToString()); |
204 | return null; | 206 | return null; |
205 | } | 207 | } |
206 | } | 208 | } |
@@ -247,7 +249,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
247 | catch (Exception e) | 249 | catch (Exception e) |
248 | { | 250 | { |
249 | database.Reconnect(); | 251 | database.Reconnect(); |
250 | MainLog.Instance.Error(e.ToString()); | 252 | m_log.Error(e.ToString()); |
251 | return returnlist; | 253 | return returnlist; |
252 | } | 254 | } |
253 | } | 255 | } |
@@ -282,7 +284,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
282 | catch (Exception e) | 284 | catch (Exception e) |
283 | { | 285 | { |
284 | database.Reconnect(); | 286 | database.Reconnect(); |
285 | MainLog.Instance.Error(e.ToString()); | 287 | m_log.Error(e.ToString()); |
286 | return returnlist; | 288 | return returnlist; |
287 | } | 289 | } |
288 | } | 290 | } |
@@ -316,7 +318,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
316 | catch (Exception e) | 318 | catch (Exception e) |
317 | { | 319 | { |
318 | database.Reconnect(); | 320 | database.Reconnect(); |
319 | MainLog.Instance.Error(e.ToString()); | 321 | m_log.Error(e.ToString()); |
320 | return null; | 322 | return null; |
321 | } | 323 | } |
322 | } | 324 | } |
@@ -405,7 +407,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
405 | catch (Exception e) | 407 | catch (Exception e) |
406 | { | 408 | { |
407 | database.Reconnect(); | 409 | database.Reconnect(); |
408 | MainLog.Instance.Error(e.ToString()); | 410 | m_log.Error(e.ToString()); |
409 | return null; | 411 | return null; |
410 | } | 412 | } |
411 | } | 413 | } |
diff --git a/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs b/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs index c317f4a..57c2c9f 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLInventoryData.cs | |||
@@ -38,6 +38,8 @@ namespace OpenSim.Framework.Data.MySQL | |||
38 | /// </summary> | 38 | /// </summary> |
39 | public class MySQLInventoryData : IInventoryData | 39 | public class MySQLInventoryData : IInventoryData |
40 | { | 40 | { |
41 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
41 | /// <summary> | 43 | /// <summary> |
42 | /// The database manager | 44 | /// The database manager |
43 | /// </summary> | 45 | /// </summary> |
@@ -104,8 +106,8 @@ namespace OpenSim.Framework.Data.MySQL | |||
104 | tableList["inventoryitems"] = null; | 106 | tableList["inventoryitems"] = null; |
105 | 107 | ||
106 | database.GetTableVersion(tableList); | 108 | database.GetTableVersion(tableList); |
107 | MainLog.Instance.Verbose("MYSQL", "Inventory Folder Version: " + tableList["inventoryfolders"]); | 109 | m_log.Info("[MYSQL]: Inventory Folder Version: " + tableList["inventoryfolders"]); |
108 | MainLog.Instance.Verbose("MYSQL", "Inventory Items Version: " + tableList["inventoryitems"]); | 110 | m_log.Info("[MYSQL]: Inventory Items Version: " + tableList["inventoryitems"]); |
109 | 111 | ||
110 | UpgradeFoldersTable(tableList["inventoryfolders"]); | 112 | UpgradeFoldersTable(tableList["inventoryfolders"]); |
111 | UpgradeItemsTable(tableList["inventoryitems"]); | 113 | UpgradeItemsTable(tableList["inventoryitems"]); |
@@ -170,7 +172,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
170 | catch (Exception e) | 172 | catch (Exception e) |
171 | { | 173 | { |
172 | database.Reconnect(); | 174 | database.Reconnect(); |
173 | MainLog.Instance.Error(e.ToString()); | 175 | m_log.Error(e.ToString()); |
174 | return null; | 176 | return null; |
175 | } | 177 | } |
176 | } | 178 | } |
@@ -208,7 +210,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
208 | catch (Exception e) | 210 | catch (Exception e) |
209 | { | 211 | { |
210 | database.Reconnect(); | 212 | database.Reconnect(); |
211 | MainLog.Instance.Error(e.ToString()); | 213 | m_log.Error(e.ToString()); |
212 | return null; | 214 | return null; |
213 | } | 215 | } |
214 | } | 216 | } |
@@ -254,7 +256,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
254 | catch (Exception e) | 256 | catch (Exception e) |
255 | { | 257 | { |
256 | database.Reconnect(); | 258 | database.Reconnect(); |
257 | MainLog.Instance.Error(e.ToString()); | 259 | m_log.Error(e.ToString()); |
258 | return null; | 260 | return null; |
259 | } | 261 | } |
260 | } | 262 | } |
@@ -292,7 +294,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
292 | catch (Exception e) | 294 | catch (Exception e) |
293 | { | 295 | { |
294 | database.Reconnect(); | 296 | database.Reconnect(); |
295 | MainLog.Instance.Error(e.ToString()); | 297 | m_log.Error(e.ToString()); |
296 | return null; | 298 | return null; |
297 | } | 299 | } |
298 | } | 300 | } |
@@ -325,7 +327,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
325 | } | 327 | } |
326 | catch (MySqlException e) | 328 | catch (MySqlException e) |
327 | { | 329 | { |
328 | MainLog.Instance.Error(e.ToString()); | 330 | m_log.Error(e.ToString()); |
329 | } | 331 | } |
330 | 332 | ||
331 | return null; | 333 | return null; |
@@ -362,7 +364,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
362 | catch (Exception e) | 364 | catch (Exception e) |
363 | { | 365 | { |
364 | database.Reconnect(); | 366 | database.Reconnect(); |
365 | MainLog.Instance.Error(e.ToString()); | 367 | m_log.Error(e.ToString()); |
366 | } | 368 | } |
367 | return null; | 369 | return null; |
368 | } | 370 | } |
@@ -387,7 +389,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
387 | } | 389 | } |
388 | catch (Exception e) | 390 | catch (Exception e) |
389 | { | 391 | { |
390 | MainLog.Instance.Error(e.ToString()); | 392 | m_log.Error(e.ToString()); |
391 | } | 393 | } |
392 | 394 | ||
393 | return null; | 395 | return null; |
@@ -421,7 +423,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
421 | catch (Exception e) | 423 | catch (Exception e) |
422 | { | 424 | { |
423 | database.Reconnect(); | 425 | database.Reconnect(); |
424 | MainLog.Instance.Error(e.ToString()); | 426 | m_log.Error(e.ToString()); |
425 | return null; | 427 | return null; |
426 | } | 428 | } |
427 | } | 429 | } |
@@ -459,7 +461,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
459 | } | 461 | } |
460 | catch (MySqlException e) | 462 | catch (MySqlException e) |
461 | { | 463 | { |
462 | MainLog.Instance.Error(e.ToString()); | 464 | m_log.Error(e.ToString()); |
463 | } | 465 | } |
464 | } | 466 | } |
465 | 467 | ||
@@ -488,7 +490,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
488 | catch (MySqlException e) | 490 | catch (MySqlException e) |
489 | { | 491 | { |
490 | database.Reconnect(); | 492 | database.Reconnect(); |
491 | MainLog.Instance.Error(e.ToString()); | 493 | m_log.Error(e.ToString()); |
492 | } | 494 | } |
493 | } | 495 | } |
494 | 496 | ||
@@ -516,7 +518,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
516 | } | 518 | } |
517 | catch (Exception e) | 519 | catch (Exception e) |
518 | { | 520 | { |
519 | MainLog.Instance.Error(e.ToString()); | 521 | m_log.Error(e.ToString()); |
520 | } | 522 | } |
521 | } | 523 | } |
522 | 524 | ||
@@ -548,7 +550,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
548 | } | 550 | } |
549 | catch (Exception e) | 551 | catch (Exception e) |
550 | { | 552 | { |
551 | MainLog.Instance.Error(e.ToString()); | 553 | m_log.Error(e.ToString()); |
552 | } | 554 | } |
553 | } | 555 | } |
554 | 556 | ||
@@ -593,7 +595,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
593 | catch (MySqlException e) | 595 | catch (MySqlException e) |
594 | { | 596 | { |
595 | database.Reconnect(); | 597 | database.Reconnect(); |
596 | MainLog.Instance.Error(e.ToString()); | 598 | m_log.Error(e.ToString()); |
597 | } | 599 | } |
598 | } | 600 | } |
599 | 601 | ||
@@ -609,7 +611,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
609 | catch (MySqlException e) | 611 | catch (MySqlException e) |
610 | { | 612 | { |
611 | database.Reconnect(); | 613 | database.Reconnect(); |
612 | MainLog.Instance.Error(e.ToString()); | 614 | m_log.Error(e.ToString()); |
613 | } | 615 | } |
614 | } | 616 | } |
615 | 617 | ||
diff --git a/OpenSim/Framework/Data.MySQL/MySQLManager.cs b/OpenSim/Framework/Data.MySQL/MySQLManager.cs index 3df0242..f70b505 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLManager.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLManager.cs | |||
@@ -42,6 +42,8 @@ namespace OpenSim.Framework.Data.MySQL | |||
42 | /// </summary> | 42 | /// </summary> |
43 | internal class MySQLManager | 43 | internal class MySQLManager |
44 | { | 44 | { |
45 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | |||
45 | /// <summary> | 47 | /// <summary> |
46 | /// The database connection object | 48 | /// The database connection object |
47 | /// </summary> | 49 | /// </summary> |
@@ -71,7 +73,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
71 | 73 | ||
72 | dbcon.Open(); | 74 | dbcon.Open(); |
73 | 75 | ||
74 | MainLog.Instance.Verbose("MYSQL", "Connection established"); | 76 | m_log.Info("[MYSQL]: Connection established"); |
75 | } | 77 | } |
76 | catch (Exception e) | 78 | catch (Exception e) |
77 | { | 79 | { |
@@ -113,7 +115,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
113 | } | 115 | } |
114 | catch (Exception e) | 116 | catch (Exception e) |
115 | { | 117 | { |
116 | MainLog.Instance.Error("Unable to reconnect to database " + e.ToString()); | 118 | m_log.Error("Unable to reconnect to database " + e.ToString()); |
117 | } | 119 | } |
118 | } | 120 | } |
119 | } | 121 | } |
@@ -194,7 +196,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
194 | } | 196 | } |
195 | catch (Exception e) | 197 | catch (Exception e) |
196 | { | 198 | { |
197 | MainLog.Instance.Error(e.ToString()); | 199 | m_log.Error(e.ToString()); |
198 | } | 200 | } |
199 | } | 201 | } |
200 | tables.Close(); | 202 | tables.Close(); |
@@ -245,7 +247,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
245 | } | 247 | } |
246 | catch (Exception e) | 248 | catch (Exception e) |
247 | { | 249 | { |
248 | MainLog.Instance.Error("Unable to reconnect to database " + e.ToString()); | 250 | m_log.Error("Unable to reconnect to database " + e.ToString()); |
249 | } | 251 | } |
250 | 252 | ||
251 | // Run the query again | 253 | // Run the query again |
@@ -263,7 +265,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
263 | catch (Exception e) | 265 | catch (Exception e) |
264 | { | 266 | { |
265 | // Return null if it fails. | 267 | // Return null if it fails. |
266 | MainLog.Instance.Error("Failed during Query generation: " + e.ToString()); | 268 | m_log.Error("Failed during Query generation: " + e.ToString()); |
267 | return null; | 269 | return null; |
268 | } | 270 | } |
269 | } | 271 | } |
@@ -523,7 +525,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
523 | } | 525 | } |
524 | catch (Exception e) | 526 | catch (Exception e) |
525 | { | 527 | { |
526 | MainLog.Instance.Error(e.ToString()); | 528 | m_log.Error(e.ToString()); |
527 | return false; | 529 | return false; |
528 | } | 530 | } |
529 | 531 | ||
@@ -617,7 +619,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
617 | } | 619 | } |
618 | catch (Exception e) | 620 | catch (Exception e) |
619 | { | 621 | { |
620 | MainLog.Instance.Error(e.ToString()); | 622 | m_log.Error(e.ToString()); |
621 | return false; | 623 | return false; |
622 | } | 624 | } |
623 | 625 | ||
@@ -726,7 +728,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
726 | } | 728 | } |
727 | catch (Exception e) | 729 | catch (Exception e) |
728 | { | 730 | { |
729 | MainLog.Instance.Error(e.ToString()); | 731 | m_log.Error(e.ToString()); |
730 | return false; | 732 | return false; |
731 | } | 733 | } |
732 | 734 | ||
diff --git a/OpenSim/Framework/Data.MySQL/MySQLUserData.cs b/OpenSim/Framework/Data.MySQL/MySQLUserData.cs index 2ee20e0..0db727c 100644 --- a/OpenSim/Framework/Data.MySQL/MySQLUserData.cs +++ b/OpenSim/Framework/Data.MySQL/MySQLUserData.cs | |||
@@ -39,6 +39,8 @@ namespace OpenSim.Framework.Data.MySQL | |||
39 | /// </summary> | 39 | /// </summary> |
40 | internal class MySQLUserData : IUserData | 40 | internal class MySQLUserData : IUserData |
41 | { | 41 | { |
42 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
43 | |||
42 | /// <summary> | 44 | /// <summary> |
43 | /// Database manager for MySQL | 45 | /// Database manager for MySQL |
44 | /// </summary> | 46 | /// </summary> |
@@ -119,7 +121,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
119 | database.ExecuteResourceSql("UpgradeUsersTableToVersion2.sql"); | 121 | database.ExecuteResourceSql("UpgradeUsersTableToVersion2.sql"); |
120 | return; | 122 | return; |
121 | } | 123 | } |
122 | //MainLog.Instance.Verbose("DB","DBVers:" + oldVersion); | 124 | //m_log.Info("[DB]: DBVers:" + oldVersion); |
123 | } | 125 | } |
124 | 126 | ||
125 | /// <summary> | 127 | /// <summary> |
@@ -164,7 +166,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
164 | catch (Exception e) | 166 | catch (Exception e) |
165 | { | 167 | { |
166 | database.Reconnect(); | 168 | database.Reconnect(); |
167 | MainLog.Instance.Error(e.ToString()); | 169 | m_log.Error(e.ToString()); |
168 | return null; | 170 | return null; |
169 | } | 171 | } |
170 | } | 172 | } |
@@ -208,7 +210,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
208 | catch (Exception e) | 210 | catch (Exception e) |
209 | { | 211 | { |
210 | database.Reconnect(); | 212 | database.Reconnect(); |
211 | MainLog.Instance.Error(e.ToString()); | 213 | m_log.Error(e.ToString()); |
212 | return; | 214 | return; |
213 | } | 215 | } |
214 | } | 216 | } |
@@ -243,7 +245,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
243 | catch (Exception e) | 245 | catch (Exception e) |
244 | { | 246 | { |
245 | database.Reconnect(); | 247 | database.Reconnect(); |
246 | MainLog.Instance.Error(e.ToString()); | 248 | m_log.Error(e.ToString()); |
247 | return; | 249 | return; |
248 | } | 250 | } |
249 | } | 251 | } |
@@ -272,7 +274,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
272 | catch (Exception e) | 274 | catch (Exception e) |
273 | { | 275 | { |
274 | database.Reconnect(); | 276 | database.Reconnect(); |
275 | MainLog.Instance.Error(e.ToString()); | 277 | m_log.Error(e.ToString()); |
276 | return; | 278 | return; |
277 | } | 279 | } |
278 | } | 280 | } |
@@ -317,7 +319,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
317 | catch (Exception e) | 319 | catch (Exception e) |
318 | { | 320 | { |
319 | database.Reconnect(); | 321 | database.Reconnect(); |
320 | MainLog.Instance.Error(e.ToString()); | 322 | m_log.Error(e.ToString()); |
321 | return Lfli; | 323 | return Lfli; |
322 | } | 324 | } |
323 | 325 | ||
@@ -328,7 +330,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
328 | 330 | ||
329 | public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid) | 331 | public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid) |
330 | { | 332 | { |
331 | MainLog.Instance.Verbose("USER", "Stub UpdateUserCUrrentRegion called"); | 333 | m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called"); |
332 | } | 334 | } |
333 | 335 | ||
334 | 336 | ||
@@ -371,7 +373,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
371 | catch (Exception e) | 373 | catch (Exception e) |
372 | { | 374 | { |
373 | database.Reconnect(); | 375 | database.Reconnect(); |
374 | MainLog.Instance.Error(e.ToString()); | 376 | m_log.Error(e.ToString()); |
375 | return returnlist; | 377 | return returnlist; |
376 | } | 378 | } |
377 | } | 379 | } |
@@ -406,7 +408,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
406 | catch (Exception e) | 408 | catch (Exception e) |
407 | { | 409 | { |
408 | database.Reconnect(); | 410 | database.Reconnect(); |
409 | MainLog.Instance.Error(e.ToString()); | 411 | m_log.Error(e.ToString()); |
410 | return returnlist; | 412 | return returnlist; |
411 | } | 413 | } |
412 | } | 414 | } |
@@ -437,7 +439,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
437 | catch (Exception e) | 439 | catch (Exception e) |
438 | { | 440 | { |
439 | database.Reconnect(); | 441 | database.Reconnect(); |
440 | MainLog.Instance.Error(e.ToString()); | 442 | m_log.Error(e.ToString()); |
441 | return null; | 443 | return null; |
442 | } | 444 | } |
443 | } | 445 | } |
@@ -488,7 +490,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
488 | catch (Exception e) | 490 | catch (Exception e) |
489 | { | 491 | { |
490 | database.Reconnect(); | 492 | database.Reconnect(); |
491 | MainLog.Instance.Error(e.ToString()); | 493 | m_log.Error(e.ToString()); |
492 | return; | 494 | return; |
493 | } | 495 | } |
494 | 496 | ||
@@ -525,7 +527,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
525 | catch (Exception e) | 527 | catch (Exception e) |
526 | { | 528 | { |
527 | database.Reconnect(); | 529 | database.Reconnect(); |
528 | MainLog.Instance.Error(e.ToString()); | 530 | m_log.Error(e.ToString()); |
529 | return null; | 531 | return null; |
530 | } | 532 | } |
531 | } | 533 | } |
@@ -553,7 +555,7 @@ namespace OpenSim.Framework.Data.MySQL | |||
553 | catch (Exception e) | 555 | catch (Exception e) |
554 | { | 556 | { |
555 | database.Reconnect(); | 557 | database.Reconnect(); |
556 | MainLog.Instance.Error(e.ToString()); | 558 | m_log.Error(e.ToString()); |
557 | } | 559 | } |
558 | } | 560 | } |
559 | 561 | ||
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs index 76608c7..d08ef8b 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteAssetData.cs | |||
@@ -39,6 +39,8 @@ namespace OpenSim.Framework.Data.SQLite | |||
39 | /// </summary> | 39 | /// </summary> |
40 | public class SQLiteAssetData : SQLiteBase, IAssetProvider | 40 | public class SQLiteAssetData : SQLiteBase, IAssetProvider |
41 | { | 41 | { |
42 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
43 | |||
42 | /// <summary> | 44 | /// <summary> |
43 | /// The database manager | 45 | /// The database manager |
44 | /// </summary> | 46 | /// </summary> |
@@ -86,10 +88,10 @@ namespace OpenSim.Framework.Data.SQLite | |||
86 | 88 | ||
87 | public void CreateAsset(AssetBase asset) | 89 | public void CreateAsset(AssetBase asset) |
88 | { | 90 | { |
89 | MainLog.Instance.Verbose("SQLITE", "Creating Asset " + Util.ToRawUuidString(asset.FullID)); | 91 | m_log.Info("[SQLITE]: Creating Asset " + Util.ToRawUuidString(asset.FullID)); |
90 | if (ExistsAsset(asset.FullID)) | 92 | if (ExistsAsset(asset.FullID)) |
91 | { | 93 | { |
92 | MainLog.Instance.Verbose("SQLITE", "Asset exists, updating instead. You should fix the caller for this!"); | 94 | m_log.Info("[SQLITE]: Asset exists, updating instead. You should fix the caller for this!"); |
93 | UpdateAsset(asset); | 95 | UpdateAsset(asset); |
94 | } | 96 | } |
95 | else | 97 | else |
@@ -135,7 +137,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
135 | string temporary = asset.Temporary ? "Temporary" : "Stored"; | 137 | string temporary = asset.Temporary ? "Temporary" : "Stored"; |
136 | string local = asset.Local ? "Local" : "Remote"; | 138 | string local = asset.Local ? "Local" : "Remote"; |
137 | 139 | ||
138 | MainLog.Instance.Verbose("SQLITE", | 140 | m_log.Info("[SQLITE]: " + |
139 | string.Format("Loaded {6} {5} Asset: [{0}][{3}/{4}] \"{1}\":{2} ({7} bytes)", | 141 | string.Format("Loaded {6} {5} Asset: [{0}][{3}/{4}] \"{1}\":{2} ({7} bytes)", |
140 | asset.FullID, asset.Name, asset.Description, asset.Type, | 142 | asset.FullID, asset.Name, asset.Description, asset.Type, |
141 | asset.InvType, temporary, local, asset.Data.Length)); | 143 | asset.InvType, temporary, local, asset.Data.Length)); |
@@ -174,7 +176,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
174 | 176 | ||
175 | public void CommitAssets() // force a sync to the database | 177 | public void CommitAssets() // force a sync to the database |
176 | { | 178 | { |
177 | MainLog.Instance.Verbose("SQLITE", "Attempting commit"); | 179 | m_log.Info("[SQLITE]: Attempting commit"); |
178 | // lock (ds) | 180 | // lock (ds) |
179 | // { | 181 | // { |
180 | // da.Update(ds, "assets"); | 182 | // da.Update(ds, "assets"); |
@@ -261,7 +263,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
261 | } | 263 | } |
262 | catch (SqliteSyntaxException) | 264 | catch (SqliteSyntaxException) |
263 | { | 265 | { |
264 | MainLog.Instance.Verbose("SQLITE", "SQLite Database doesn't exist... creating"); | 266 | m_log.Info("[SQLITE]: SQLite Database doesn't exist... creating"); |
265 | InitDB(conn); | 267 | InitDB(conn); |
266 | } | 268 | } |
267 | return true; | 269 | return true; |
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs b/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs index 64a27f0..5e5d1e4 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteInventoryStore.cs | |||
@@ -38,6 +38,8 @@ namespace OpenSim.Framework.Data.SQLite | |||
38 | { | 38 | { |
39 | public class SQLiteInventoryStore : SQLiteBase, IInventoryData | 39 | public class SQLiteInventoryStore : SQLiteBase, IInventoryData |
40 | { | 40 | { |
41 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
41 | private const string invItemsSelect = "select * from inventoryitems"; | 43 | private const string invItemsSelect = "select * from inventoryitems"; |
42 | private const string invFoldersSelect = "select * from inventoryfolders"; | 44 | private const string invFoldersSelect = "select * from inventoryfolders"; |
43 | 45 | ||
@@ -57,7 +59,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
57 | { | 59 | { |
58 | string connectionString = "URI=file:" + dbfile + ",version=3"; | 60 | string connectionString = "URI=file:" + dbfile + ",version=3"; |
59 | 61 | ||
60 | MainLog.Instance.Verbose("Inventory", "Sqlite - connecting: " + dbfile); | 62 | m_log.Info("[Inventory]: Sqlite - connecting: " + dbfile); |
61 | SqliteConnection conn = new SqliteConnection(connectionString); | 63 | SqliteConnection conn = new SqliteConnection(connectionString); |
62 | 64 | ||
63 | TestTables(conn); | 65 | TestTables(conn); |
@@ -74,12 +76,12 @@ namespace OpenSim.Framework.Data.SQLite | |||
74 | ds.Tables.Add(createInventoryFoldersTable()); | 76 | ds.Tables.Add(createInventoryFoldersTable()); |
75 | invFoldersDa.Fill(ds.Tables["inventoryfolders"]); | 77 | invFoldersDa.Fill(ds.Tables["inventoryfolders"]); |
76 | setupFoldersCommands(invFoldersDa, conn); | 78 | setupFoldersCommands(invFoldersDa, conn); |
77 | MainLog.Instance.Verbose("DATASTORE", "Populated Intentory Folders Definitions"); | 79 | m_log.Info("[DATASTORE]: Populated Intentory Folders Definitions"); |
78 | 80 | ||
79 | ds.Tables.Add(createInventoryItemsTable()); | 81 | ds.Tables.Add(createInventoryItemsTable()); |
80 | invItemsDa.Fill(ds.Tables["inventoryitems"]); | 82 | invItemsDa.Fill(ds.Tables["inventoryitems"]); |
81 | setupItemsCommands(invItemsDa, conn); | 83 | setupItemsCommands(invItemsDa, conn); |
82 | MainLog.Instance.Verbose("DATASTORE", "Populated Intentory Items Definitions"); | 84 | m_log.Info("[DATASTORE]: Populated Intentory Items Definitions"); |
83 | 85 | ||
84 | ds.AcceptChanges(); | 86 | ds.AcceptChanges(); |
85 | } | 87 | } |
@@ -603,7 +605,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
603 | } | 605 | } |
604 | catch (SqliteSyntaxException) | 606 | catch (SqliteSyntaxException) |
605 | { | 607 | { |
606 | MainLog.Instance.Verbose("DATASTORE", "SQLite Database doesn't exist... creating"); | 608 | m_log.Info("[DATASTORE]: SQLite Database doesn't exist... creating"); |
607 | InitDB(conn); | 609 | InitDB(conn); |
608 | } | 610 | } |
609 | 611 | ||
@@ -614,7 +616,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
614 | { | 616 | { |
615 | if (! tmpDS.Tables["inventoryitems"].Columns.Contains(col.ColumnName)) | 617 | if (! tmpDS.Tables["inventoryitems"].Columns.Contains(col.ColumnName)) |
616 | { | 618 | { |
617 | MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName); | 619 | m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName); |
618 | return false; | 620 | return false; |
619 | } | 621 | } |
620 | } | 622 | } |
@@ -622,7 +624,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
622 | { | 624 | { |
623 | if (! tmpDS.Tables["inventoryfolders"].Columns.Contains(col.ColumnName)) | 625 | if (! tmpDS.Tables["inventoryfolders"].Columns.Contains(col.ColumnName)) |
624 | { | 626 | { |
625 | MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName); | 627 | m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName); |
626 | return false; | 628 | return false; |
627 | } | 629 | } |
628 | } | 630 | } |
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteManager.cs b/OpenSim/Framework/Data.SQLite/SQLiteManager.cs index a97b146..c77a8f6 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteManager.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteManager.cs | |||
@@ -37,6 +37,8 @@ namespace OpenSim.Framework.Data.SQLite | |||
37 | { | 37 | { |
38 | internal class SQLiteManager : SQLiteBase | 38 | internal class SQLiteManager : SQLiteBase |
39 | { | 39 | { |
40 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | |||
40 | private IDbConnection dbcon; | 42 | private IDbConnection dbcon; |
41 | 43 | ||
42 | /// <summary> | 44 | /// <summary> |
@@ -101,7 +103,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
101 | } | 103 | } |
102 | catch (SqliteSyntaxException) | 104 | catch (SqliteSyntaxException) |
103 | { | 105 | { |
104 | MainLog.Instance.Verbose("DATASTORE", "SQLite Database doesn't exist... creating"); | 106 | m_log.Info("[DATASTORE]: SQLite Database doesn't exist... creating"); |
105 | InitDB(conn); | 107 | InitDB(conn); |
106 | } | 108 | } |
107 | return true; | 109 | return true; |
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs b/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs index 0afc0ce..69dc3f5 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs | |||
@@ -42,6 +42,8 @@ namespace OpenSim.Framework.Data.SQLite | |||
42 | { | 42 | { |
43 | public class SQLiteRegionData : IRegionDataStore | 43 | public class SQLiteRegionData : IRegionDataStore |
44 | { | 44 | { |
45 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | |||
45 | private const string primSelect = "select * from prims"; | 47 | private const string primSelect = "select * from prims"; |
46 | private const string shapeSelect = "select * from primshapes"; | 48 | private const string shapeSelect = "select * from primshapes"; |
47 | private const string itemsSelect = "select * from primitems"; | 49 | private const string itemsSelect = "select * from primitems"; |
@@ -78,7 +80,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
78 | 80 | ||
79 | ds = new DataSet(); | 81 | ds = new DataSet(); |
80 | 82 | ||
81 | MainLog.Instance.Verbose("DATASTORE", "Sqlite - connecting: " + connectionString); | 83 | m_log.Info("[DATASTORE]: Sqlite - connecting: " + connectionString); |
82 | m_conn = new SqliteConnection(m_connectionString); | 84 | m_conn = new SqliteConnection(m_connectionString); |
83 | m_conn.Open(); | 85 | m_conn.Open(); |
84 | 86 | ||
@@ -142,7 +144,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
142 | } | 144 | } |
143 | catch (Exception) | 145 | catch (Exception) |
144 | { | 146 | { |
145 | MainLog.Instance.Verbose("DATASTORE", "Caught fill error on primshapes table"); | 147 | m_log.Info("[DATASTORE]: Caught fill error on primshapes table"); |
146 | } | 148 | } |
147 | 149 | ||
148 | try | 150 | try |
@@ -151,7 +153,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
151 | } | 153 | } |
152 | catch (Exception) | 154 | catch (Exception) |
153 | { | 155 | { |
154 | MainLog.Instance.Verbose("DATASTORE", "Caught fill error on terrain table"); | 156 | m_log.Info("[DATASTORE]: Caught fill error on terrain table"); |
155 | } | 157 | } |
156 | 158 | ||
157 | try | 159 | try |
@@ -160,7 +162,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
160 | } | 162 | } |
161 | catch (Exception) | 163 | catch (Exception) |
162 | { | 164 | { |
163 | MainLog.Instance.Verbose("DATASTORE", "Caught fill error on land table"); | 165 | m_log.Info("[DATASTORE]: Caught fill error on land table"); |
164 | } | 166 | } |
165 | 167 | ||
166 | try | 168 | try |
@@ -169,7 +171,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
169 | } | 171 | } |
170 | catch (Exception) | 172 | catch (Exception) |
171 | { | 173 | { |
172 | MainLog.Instance.Verbose("DATASTORE", "Caught fill error on landaccesslist table"); | 174 | m_log.Info("[DATASTORE]: Caught fill error on landaccesslist table"); |
173 | } | 175 | } |
174 | return; | 176 | return; |
175 | } | 177 | } |
@@ -183,29 +185,29 @@ namespace OpenSim.Framework.Data.SQLite | |||
183 | { | 185 | { |
184 | if ((prim.ObjectFlags & (uint) LLObject.ObjectFlags.Physics) == 0) | 186 | if ((prim.ObjectFlags & (uint) LLObject.ObjectFlags.Physics) == 0) |
185 | { | 187 | { |
186 | MainLog.Instance.Verbose("DATASTORE", "Adding obj: " + obj.UUID + " to region: " + regionUUID); | 188 | m_log.Info("[DATASTORE]: Adding obj: " + obj.UUID + " to region: " + regionUUID); |
187 | addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID)); | 189 | addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID)); |
188 | } | 190 | } |
189 | else if (prim.Stopped) | 191 | else if (prim.Stopped) |
190 | { | 192 | { |
191 | //MainLog.Instance.Verbose("DATASTORE", | 193 | //m_log.Info("[DATASTORE]: " + |
192 | //"Adding stopped obj: " + obj.UUID + " to region: " + regionUUID); | 194 | //"Adding stopped obj: " + obj.UUID + " to region: " + regionUUID); |
193 | //addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID)); | 195 | //addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID)); |
194 | } | 196 | } |
195 | else | 197 | else |
196 | { | 198 | { |
197 | // MainLog.Instance.Verbose("DATASTORE", "Ignoring Physical obj: " + obj.UUID + " in region: " + regionUUID); | 199 | // m_log.Info("[DATASTORE]: Ignoring Physical obj: " + obj.UUID + " in region: " + regionUUID); |
198 | } | 200 | } |
199 | } | 201 | } |
200 | } | 202 | } |
201 | 203 | ||
202 | Commit(); | 204 | Commit(); |
203 | // MainLog.Instance.Verbose("Dump of prims:", ds.GetXml()); | 205 | // m_log.Info("[Dump of prims]: " + ds.GetXml()); |
204 | } | 206 | } |
205 | 207 | ||
206 | public void RemoveObject(LLUUID obj, LLUUID regionUUID) | 208 | public void RemoveObject(LLUUID obj, LLUUID regionUUID) |
207 | { | 209 | { |
208 | MainLog.Instance.Verbose("DATASTORE", "Removing obj: {0} from region: {1}", obj.UUID, regionUUID); | 210 | m_log.Info(String.Format("[DATASTORE]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID)); |
209 | 211 | ||
210 | DataTable prims = ds.Tables["prims"]; | 212 | DataTable prims = ds.Tables["prims"]; |
211 | DataTable shapes = ds.Tables["primshapes"]; | 213 | DataTable shapes = ds.Tables["primshapes"]; |
@@ -274,7 +276,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
274 | lock (ds) | 276 | lock (ds) |
275 | { | 277 | { |
276 | DataRow[] primsForRegion = prims.Select(byRegion, orderByParent); | 278 | DataRow[] primsForRegion = prims.Select(byRegion, orderByParent); |
277 | MainLog.Instance.Verbose("DATASTORE", | 279 | m_log.Info("[DATASTORE]: " + |
278 | "Loaded " + primsForRegion.Length + " prims for region: " + regionUUID); | 280 | "Loaded " + primsForRegion.Length + " prims for region: " + regionUUID); |
279 | 281 | ||
280 | foreach (DataRow primRow in primsForRegion) | 282 | foreach (DataRow primRow in primsForRegion) |
@@ -296,7 +298,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
296 | } | 298 | } |
297 | else | 299 | else |
298 | { | 300 | { |
299 | MainLog.Instance.Notice( | 301 | m_log.Info( |
300 | "No shape found for prim in storage, so setting default box shape"); | 302 | "No shape found for prim in storage, so setting default box shape"); |
301 | prim.Shape = PrimitiveBaseShape.Default; | 303 | prim.Shape = PrimitiveBaseShape.Default; |
302 | } | 304 | } |
@@ -316,7 +318,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
316 | } | 318 | } |
317 | else | 319 | else |
318 | { | 320 | { |
319 | MainLog.Instance.Notice( | 321 | m_log.Info( |
320 | "No shape found for prim in storage, so setting default box shape"); | 322 | "No shape found for prim in storage, so setting default box shape"); |
321 | prim.Shape = PrimitiveBaseShape.Default; | 323 | prim.Shape = PrimitiveBaseShape.Default; |
322 | } | 324 | } |
@@ -330,11 +332,11 @@ namespace OpenSim.Framework.Data.SQLite | |||
330 | } | 332 | } |
331 | catch (Exception e) | 333 | catch (Exception e) |
332 | { | 334 | { |
333 | MainLog.Instance.Error("DATASTORE", "Failed create prim object, exception and data follows"); | 335 | m_log.Error("[DATASTORE]: Failed create prim object, exception and data follows"); |
334 | MainLog.Instance.Verbose("DATASTORE", e.ToString()); | 336 | m_log.Info("[DATASTORE]: " + e.ToString()); |
335 | foreach (DataColumn col in prims.Columns) | 337 | foreach (DataColumn col in prims.Columns) |
336 | { | 338 | { |
337 | MainLog.Instance.Verbose("DATASTORE", "Col: " + col.ColumnName + " => " + primRow[col]); | 339 | m_log.Info("[DATASTORE]: Col: " + col.ColumnName + " => " + primRow[col]); |
338 | } | 340 | } |
339 | } | 341 | } |
340 | } | 342 | } |
@@ -348,7 +350,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
348 | /// <param name="prim"></param> | 350 | /// <param name="prim"></param> |
349 | private void LoadItems(SceneObjectPart prim) | 351 | private void LoadItems(SceneObjectPart prim) |
350 | { | 352 | { |
351 | MainLog.Instance.Verbose("DATASTORE", "Loading inventory for {0}, {1}", prim.Name, prim.UUID); | 353 | m_log.Info(String.Format("[DATASTORE]: Loading inventory for {0}, {1}", prim.Name, prim.UUID)); |
352 | 354 | ||
353 | DataTable dbItems = ds.Tables["primitems"]; | 355 | DataTable dbItems = ds.Tables["primitems"]; |
354 | 356 | ||
@@ -362,7 +364,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
362 | TaskInventoryItem item = buildItem(row); | 364 | TaskInventoryItem item = buildItem(row); |
363 | inventory.Add(item); | 365 | inventory.Add(item); |
364 | 366 | ||
365 | MainLog.Instance.Verbose("DATASTORE", "Restored item {0}, {1}", item.Name, item.ItemID); | 367 | m_log.Info(String.Format("[DATASTORE]: Restored item {0}, {1}", item.Name, item.ItemID)); |
366 | } | 368 | } |
367 | 369 | ||
368 | prim.RestoreInventoryItems(inventory); | 370 | prim.RestoreInventoryItems(inventory); |
@@ -383,7 +385,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
383 | 385 | ||
384 | // the following is an work around for .NET. The perf | 386 | // the following is an work around for .NET. The perf |
385 | // issues associated with it aren't as bad as you think. | 387 | // issues associated with it aren't as bad as you think. |
386 | MainLog.Instance.Verbose("DATASTORE", "Storing terrain revision r" + revision.ToString()); | 388 | m_log.Info("[DATASTORE]: Storing terrain revision r" + revision.ToString()); |
387 | String sql = "insert into terrain(RegionUUID, Revision, Heightfield)" + | 389 | String sql = "insert into terrain(RegionUUID, Revision, Heightfield)" + |
388 | " values(:RegionUUID, :Revision, :Heightfield)"; | 390 | " values(:RegionUUID, :Revision, :Heightfield)"; |
389 | 391 | ||
@@ -446,11 +448,11 @@ namespace OpenSim.Framework.Data.SQLite | |||
446 | } | 448 | } |
447 | else | 449 | else |
448 | { | 450 | { |
449 | MainLog.Instance.Verbose("DATASTORE", "No terrain found for region"); | 451 | m_log.Info("[DATASTORE]: No terrain found for region"); |
450 | return null; | 452 | return null; |
451 | } | 453 | } |
452 | 454 | ||
453 | MainLog.Instance.Verbose("DATASTORE", "Loaded terrain revision r" + rev.ToString()); | 455 | m_log.Info("[DATASTORE]: Loaded terrain revision r" + rev.ToString()); |
454 | } | 456 | } |
455 | } | 457 | } |
456 | return terret; | 458 | return terret; |
@@ -1265,7 +1267,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
1265 | if (!persistPrimInventories) | 1267 | if (!persistPrimInventories) |
1266 | return; | 1268 | return; |
1267 | 1269 | ||
1268 | MainLog.Instance.Verbose("DATASTORE", "Entered StorePrimInventory with prim ID {0}", primID); | 1270 | m_log.Info(String.Format("[DATASTORE]: Entered StorePrimInventory with prim ID {0}", primID)); |
1269 | 1271 | ||
1270 | DataTable dbItems = ds.Tables["primitems"]; | 1272 | DataTable dbItems = ds.Tables["primitems"]; |
1271 | 1273 | ||
@@ -1278,10 +1280,10 @@ namespace OpenSim.Framework.Data.SQLite | |||
1278 | // repalce with current inventory details | 1280 | // repalce with current inventory details |
1279 | foreach (TaskInventoryItem newItem in items) | 1281 | foreach (TaskInventoryItem newItem in items) |
1280 | { | 1282 | { |
1281 | // MainLog.Instance.Verbose( | 1283 | // m_log.Info(String.Format( |
1282 | // "DATASTORE", | 1284 | // "[DATASTORE]: ", |
1283 | // "Adding item {0}, {1} to prim ID {2}", | 1285 | // "Adding item {0}, {1} to prim ID {2}", |
1284 | // newItem.Name, newItem.ItemID, newItem.ParentPartID); | 1286 | // newItem.Name, newItem.ItemID, newItem.ParentPartID)); |
1285 | 1287 | ||
1286 | DataRow newItemRow = dbItems.NewRow(); | 1288 | DataRow newItemRow = dbItems.NewRow(); |
1287 | fillItemRow(newItemRow, newItem); | 1289 | fillItemRow(newItemRow, newItem); |
@@ -1508,7 +1510,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
1508 | } | 1510 | } |
1509 | catch (SqliteSyntaxException) | 1511 | catch (SqliteSyntaxException) |
1510 | { | 1512 | { |
1511 | MainLog.Instance.Warn("SQLITE", "Primitives Table Already Exists"); | 1513 | m_log.Warn("[SQLITE]: Primitives Table Already Exists"); |
1512 | } | 1514 | } |
1513 | 1515 | ||
1514 | try | 1516 | try |
@@ -1517,7 +1519,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
1517 | } | 1519 | } |
1518 | catch (SqliteSyntaxException) | 1520 | catch (SqliteSyntaxException) |
1519 | { | 1521 | { |
1520 | MainLog.Instance.Warn("SQLITE", "Shapes Table Already Exists"); | 1522 | m_log.Warn("[SQLITE]: Shapes Table Already Exists"); |
1521 | } | 1523 | } |
1522 | 1524 | ||
1523 | if (persistPrimInventories) | 1525 | if (persistPrimInventories) |
@@ -1528,7 +1530,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
1528 | } | 1530 | } |
1529 | catch (SqliteSyntaxException) | 1531 | catch (SqliteSyntaxException) |
1530 | { | 1532 | { |
1531 | MainLog.Instance.Warn("SQLITE", "Primitives Inventory Table Already Exists"); | 1533 | m_log.Warn("[SQLITE]: Primitives Inventory Table Already Exists"); |
1532 | } | 1534 | } |
1533 | } | 1535 | } |
1534 | 1536 | ||
@@ -1538,7 +1540,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
1538 | } | 1540 | } |
1539 | catch (SqliteSyntaxException) | 1541 | catch (SqliteSyntaxException) |
1540 | { | 1542 | { |
1541 | MainLog.Instance.Warn("SQLITE", "Terrain Table Already Exists"); | 1543 | m_log.Warn("[SQLITE]: Terrain Table Already Exists"); |
1542 | } | 1544 | } |
1543 | 1545 | ||
1544 | try | 1546 | try |
@@ -1547,7 +1549,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
1547 | } | 1549 | } |
1548 | catch (SqliteSyntaxException) | 1550 | catch (SqliteSyntaxException) |
1549 | { | 1551 | { |
1550 | MainLog.Instance.Warn("SQLITE", "Land Table Already Exists"); | 1552 | m_log.Warn("[SQLITE]: Land Table Already Exists"); |
1551 | } | 1553 | } |
1552 | 1554 | ||
1553 | try | 1555 | try |
@@ -1556,7 +1558,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
1556 | } | 1558 | } |
1557 | catch (SqliteSyntaxException) | 1559 | catch (SqliteSyntaxException) |
1558 | { | 1560 | { |
1559 | MainLog.Instance.Warn("SQLITE", "LandAccessList Table Already Exists"); | 1561 | m_log.Warn("[SQLITE]: LandAccessList Table Already Exists"); |
1560 | } | 1562 | } |
1561 | conn.Close(); | 1563 | conn.Close(); |
1562 | } | 1564 | } |
@@ -1596,7 +1598,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
1596 | } | 1598 | } |
1597 | catch (SqliteSyntaxException) | 1599 | catch (SqliteSyntaxException) |
1598 | { | 1600 | { |
1599 | MainLog.Instance.Verbose("DATASTORE", "SQLite Database doesn't exist... creating"); | 1601 | m_log.Info("[DATASTORE]: SQLite Database doesn't exist... creating"); |
1600 | InitDB(conn); | 1602 | InitDB(conn); |
1601 | } | 1603 | } |
1602 | 1604 | ||
@@ -1614,7 +1616,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
1614 | { | 1616 | { |
1615 | if (!tmpDS.Tables["prims"].Columns.Contains(col.ColumnName)) | 1617 | if (!tmpDS.Tables["prims"].Columns.Contains(col.ColumnName)) |
1616 | { | 1618 | { |
1617 | MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName); | 1619 | m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName); |
1618 | return false; | 1620 | return false; |
1619 | } | 1621 | } |
1620 | } | 1622 | } |
@@ -1623,7 +1625,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
1623 | { | 1625 | { |
1624 | if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName)) | 1626 | if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName)) |
1625 | { | 1627 | { |
1626 | MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName); | 1628 | m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName); |
1627 | return false; | 1629 | return false; |
1628 | } | 1630 | } |
1629 | } | 1631 | } |
@@ -1634,7 +1636,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
1634 | { | 1636 | { |
1635 | if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName)) | 1637 | if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName)) |
1636 | { | 1638 | { |
1637 | MainLog.Instance.Verbose("DATASTORE", "Missing require column:" + col.ColumnName); | 1639 | m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName); |
1638 | return false; | 1640 | return false; |
1639 | } | 1641 | } |
1640 | } | 1642 | } |
@@ -1643,7 +1645,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
1643 | { | 1645 | { |
1644 | if (!tmpDS.Tables["land"].Columns.Contains(col.ColumnName)) | 1646 | if (!tmpDS.Tables["land"].Columns.Contains(col.ColumnName)) |
1645 | { | 1647 | { |
1646 | MainLog.Instance.Verbose("DATASTORE", "Missing require column:" + col.ColumnName); | 1648 | m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName); |
1647 | return false; | 1649 | return false; |
1648 | } | 1650 | } |
1649 | } | 1651 | } |
@@ -1652,7 +1654,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
1652 | { | 1654 | { |
1653 | if (!tmpDS.Tables["landaccesslist"].Columns.Contains(col.ColumnName)) | 1655 | if (!tmpDS.Tables["landaccesslist"].Columns.Contains(col.ColumnName)) |
1654 | { | 1656 | { |
1655 | MainLog.Instance.Verbose("DATASTORE", "Missing require column:" + col.ColumnName); | 1657 | m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName); |
1656 | return false; | 1658 | return false; |
1657 | } | 1659 | } |
1658 | } | 1660 | } |
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs index ac7340d..2316de8 100644 --- a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs +++ b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs | |||
@@ -39,6 +39,8 @@ namespace OpenSim.Framework.Data.SQLite | |||
39 | /// </summary> | 39 | /// </summary> |
40 | public class SQLiteUserData : SQLiteBase, IUserData | 40 | public class SQLiteUserData : SQLiteBase, IUserData |
41 | { | 41 | { |
42 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
43 | |||
42 | /// <summary> | 44 | /// <summary> |
43 | /// The database manager | 45 | /// The database manager |
44 | /// </summary> | 46 | /// </summary> |
@@ -89,7 +91,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
89 | } | 91 | } |
90 | catch (SqliteSyntaxException) | 92 | catch (SqliteSyntaxException) |
91 | { | 93 | { |
92 | MainLog.Instance.Verbose("SQLITE", "userfriends table not found, creating.... "); | 94 | m_log.Info("[SQLITE]: userfriends table not found, creating.... "); |
93 | InitDB(conn); | 95 | InitDB(conn); |
94 | daf.Fill(ds.Tables["userfriends"]); | 96 | daf.Fill(ds.Tables["userfriends"]); |
95 | } | 97 | } |
@@ -217,7 +219,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
217 | } | 219 | } |
218 | catch (Exception ex) | 220 | catch (Exception ex) |
219 | { | 221 | { |
220 | MainLog.Instance.Error("USER", "Exception getting friends list for user: " + ex.ToString()); | 222 | m_log.Error("[USER]: Exception getting friends list for user: " + ex.ToString()); |
221 | } | 223 | } |
222 | } | 224 | } |
223 | 225 | ||
@@ -231,7 +233,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
231 | 233 | ||
232 | public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid) | 234 | public void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid) |
233 | { | 235 | { |
234 | MainLog.Instance.Verbose("USER", "Stub UpdateUserCUrrentRegion called"); | 236 | m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called"); |
235 | } | 237 | } |
236 | 238 | ||
237 | 239 | ||
@@ -339,7 +341,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
339 | DataRow row = users.Rows.Find(Util.ToRawUuidString(AgentID)); | 341 | DataRow row = users.Rows.Find(Util.ToRawUuidString(AgentID)); |
340 | if (row == null) | 342 | if (row == null) |
341 | { | 343 | { |
342 | MainLog.Instance.Warn("WEBLOGIN", "Unable to store new web login key for non-existant user"); | 344 | m_log.Warn("[WEBLOGIN]: Unable to store new web login key for non-existant user"); |
343 | } | 345 | } |
344 | else | 346 | else |
345 | { | 347 | { |
@@ -411,7 +413,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
411 | } | 413 | } |
412 | } | 414 | } |
413 | 415 | ||
414 | MainLog.Instance.Verbose("SQLITE", | 416 | m_log.Info("[SQLITE]: " + |
415 | "Syncing user database: " + ds.Tables["users"].Rows.Count + " users stored"); | 417 | "Syncing user database: " + ds.Tables["users"].Rows.Count + " users stored"); |
416 | // save changes off to disk | 418 | // save changes off to disk |
417 | da.Update(ds, "users"); | 419 | da.Update(ds, "users"); |
@@ -775,7 +777,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
775 | } | 777 | } |
776 | catch (System.Exception) | 778 | catch (System.Exception) |
777 | { | 779 | { |
778 | MainLog.Instance.Verbose("USERS", "users table already exists"); | 780 | m_log.Info("[USERS]: users table already exists"); |
779 | } | 781 | } |
780 | 782 | ||
781 | try | 783 | try |
@@ -784,7 +786,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
784 | } | 786 | } |
785 | catch (System.Exception) | 787 | catch (System.Exception) |
786 | { | 788 | { |
787 | MainLog.Instance.Verbose("USERS", "userfriends table already exists"); | 789 | m_log.Info("[USERS]: userfriends table already exists"); |
788 | } | 790 | } |
789 | 791 | ||
790 | conn.Close(); | 792 | conn.Close(); |
@@ -807,7 +809,7 @@ namespace OpenSim.Framework.Data.SQLite | |||
807 | } | 809 | } |
808 | catch (SqliteSyntaxException) | 810 | catch (SqliteSyntaxException) |
809 | { | 811 | { |
810 | MainLog.Instance.Verbose("DATASTORE", "SQLite Database doesn't exist... creating"); | 812 | m_log.Info("[DATASTORE]: SQLite Database doesn't exist... creating"); |
811 | InitDB(conn); | 813 | InitDB(conn); |
812 | } | 814 | } |
813 | conn.Open(); | 815 | conn.Open(); |
diff --git a/OpenSim/Framework/Data/Properties/AssemblyInfo.cs b/OpenSim/Framework/Data/Properties/AssemblyInfo.cs index 57cf4cf..4ef500c 100644 --- a/OpenSim/Framework/Data/Properties/AssemblyInfo.cs +++ b/OpenSim/Framework/Data/Properties/AssemblyInfo.cs | |||
@@ -63,4 +63,4 @@ using System.Runtime.InteropServices; | |||
63 | // by using the '*' as shown below: | 63 | // by using the '*' as shown below: |
64 | 64 | ||
65 | [assembly : AssemblyVersion("1.0.0.0")] | 65 | [assembly : AssemblyVersion("1.0.0.0")] |
66 | [assembly : AssemblyFileVersion("1.0.0.0")] \ No newline at end of file | 66 | [assembly : AssemblyFileVersion("1.0.0.0")] |
diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs index b5a3468..26924eb 100644 --- a/OpenSim/Framework/EstateSettings.cs +++ b/OpenSim/Framework/EstateSettings.cs | |||
@@ -28,11 +28,14 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.IO; | 29 | using System.IO; |
30 | using libsecondlife; | 30 | using libsecondlife; |
31 | using OpenSim.Framework.Console; | ||
31 | 32 | ||
32 | namespace OpenSim.Framework | 33 | namespace OpenSim.Framework |
33 | { | 34 | { |
34 | public class EstateSettings | 35 | public class EstateSettings |
35 | { | 36 | { |
37 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
38 | |||
36 | //Settings to this island | 39 | //Settings to this island |
37 | private float m_billableFactor; | 40 | private float m_billableFactor; |
38 | 41 | ||
@@ -734,7 +737,7 @@ namespace OpenSim.Framework | |||
734 | } | 737 | } |
735 | else | 738 | else |
736 | { | 739 | { |
737 | OpenSim.Framework.Console.MainLog.Instance.Error("ESTATESETTINGS", "Unable to locate estate manager : " + avatarID.ToString() + " for removal"); | 740 | m_log.Error("[ESTATESETTINGS]: Unable to locate estate manager : " + avatarID.ToString() + " for removal"); |
738 | } | 741 | } |
739 | } | 742 | } |
740 | 743 | ||
@@ -749,7 +752,7 @@ namespace OpenSim.Framework | |||
749 | { | 752 | { |
750 | configMember = | 753 | configMember = |
751 | new ConfigurationMember(Path.Combine(Util.configDir(), "estate_settings.xml"), "ESTATE SETTINGS", | 754 | new ConfigurationMember(Path.Combine(Util.configDir(), "estate_settings.xml"), "ESTATE SETTINGS", |
752 | loadConfigurationOptions, handleIncomingConfiguration,true); | 755 | loadConfigurationOptions, handleIncomingConfiguration, true); |
753 | configMember.performConfigurationRetrieve(); | 756 | configMember.performConfigurationRetrieve(); |
754 | } | 757 | } |
755 | } | 758 | } |
diff --git a/OpenSim/Framework/GridConfig.cs b/OpenSim/Framework/GridConfig.cs index 61a53d7..0723756 100644 --- a/OpenSim/Framework/GridConfig.cs +++ b/OpenSim/Framework/GridConfig.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | using OpenSim.Framework.Console; | ||
30 | 31 | ||
31 | namespace OpenSim.Framework | 32 | namespace OpenSim.Framework |
32 | { | 33 | { |
diff --git a/OpenSim/Framework/InventoryConfig.cs b/OpenSim/Framework/InventoryConfig.cs index 108e7ff..0c13df5 100644 --- a/OpenSim/Framework/InventoryConfig.cs +++ b/OpenSim/Framework/InventoryConfig.cs | |||
@@ -26,6 +26,8 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using OpenSim.Framework.Console; | ||
30 | |||
29 | namespace OpenSim.Framework | 31 | namespace OpenSim.Framework |
30 | { | 32 | { |
31 | /// <summary> | 33 | /// <summary> |
diff --git a/OpenSim/Framework/MessageServerConfig.cs b/OpenSim/Framework/MessageServerConfig.cs index ccb6e7a..c7fee85 100644 --- a/OpenSim/Framework/MessageServerConfig.cs +++ b/OpenSim/Framework/MessageServerConfig.cs | |||
@@ -28,6 +28,7 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Text; | 30 | using System.Text; |
31 | using OpenSim.Framework.Console; | ||
31 | 32 | ||
32 | namespace OpenSim.Framework | 33 | namespace OpenSim.Framework |
33 | { | 34 | { |
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index 751ca9d..e953182 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs | |||
@@ -31,6 +31,7 @@ using System.Net.Sockets; | |||
31 | using System.Xml; | 31 | using System.Xml; |
32 | using libsecondlife; | 32 | using libsecondlife; |
33 | using Nini.Config; | 33 | using Nini.Config; |
34 | using OpenSim.Framework.Console; | ||
34 | 35 | ||
35 | namespace OpenSim.Framework | 36 | namespace OpenSim.Framework |
36 | { | 37 | { |
@@ -176,7 +177,7 @@ namespace OpenSim.Framework | |||
176 | public string MasterAvatarSandboxPassword = String.Empty; | 177 | public string MasterAvatarSandboxPassword = String.Empty; |
177 | 178 | ||
178 | // Apparently, we're applying the same estatesettings regardless of whether it's local or remote. | 179 | // Apparently, we're applying the same estatesettings regardless of whether it's local or remote. |
179 | private static EstateSettings m_estateSettings; | 180 | private EstateSettings m_estateSettings; |
180 | 181 | ||
181 | public EstateSettings EstateSettings | 182 | public EstateSettings EstateSettings |
182 | { | 183 | { |
@@ -196,7 +197,7 @@ namespace OpenSim.Framework | |||
196 | public RegionInfo(string description, string filename, bool skipConsoleConfig) | 197 | public RegionInfo(string description, string filename, bool skipConsoleConfig) |
197 | { | 198 | { |
198 | configMember = | 199 | configMember = |
199 | new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration,!skipConsoleConfig); | 200 | new ConfigurationMember(filename, description, loadConfigurationOptions, handleIncomingConfiguration, !skipConsoleConfig); |
200 | configMember.performConfigurationRetrieve(); | 201 | configMember.performConfigurationRetrieve(); |
201 | } | 202 | } |
202 | 203 | ||
diff --git a/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs b/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs index 8a1a038..76d0b34 100644 --- a/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs +++ b/OpenSim/Framework/RegionLoader/Web/RegionLoaderWebServer.cs | |||
@@ -35,6 +35,8 @@ namespace OpenSim.Framework.RegionLoader.Web | |||
35 | { | 35 | { |
36 | public class RegionLoaderWebServer : IRegionLoader | 36 | public class RegionLoaderWebServer : IRegionLoader |
37 | { | 37 | { |
38 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
39 | |||
38 | private IniConfigSource m_configSouce; | 40 | private IniConfigSource m_configSouce; |
39 | 41 | ||
40 | public void SetIniConfigSource(IniConfigSource configSource) | 42 | public void SetIniConfigSource(IniConfigSource configSource) |
@@ -46,7 +48,7 @@ namespace OpenSim.Framework.RegionLoader.Web | |||
46 | { | 48 | { |
47 | if (m_configSouce == null) | 49 | if (m_configSouce == null) |
48 | { | 50 | { |
49 | MainLog.Instance.Error("WEBLOADER", "Unable to load configuration source!"); | 51 | m_log.Error("[WEBLOADER]: Unable to load configuration source!"); |
50 | return null; | 52 | return null; |
51 | } | 53 | } |
52 | else | 54 | else |
@@ -55,16 +57,16 @@ namespace OpenSim.Framework.RegionLoader.Web | |||
55 | string url = startupConfig.GetString("regionload_webserver_url", System.String.Empty).Trim(); | 57 | string url = startupConfig.GetString("regionload_webserver_url", System.String.Empty).Trim(); |
56 | if (url == System.String.Empty) | 58 | if (url == System.String.Empty) |
57 | { | 59 | { |
58 | MainLog.Instance.Error("WEBLOADER", "Unable to load webserver URL - URL was empty."); | 60 | m_log.Error("[WEBLOADER]: Unable to load webserver URL - URL was empty."); |
59 | return null; | 61 | return null; |
60 | } | 62 | } |
61 | else | 63 | else |
62 | { | 64 | { |
63 | HttpWebRequest webRequest = (HttpWebRequest) WebRequest.Create(url); | 65 | HttpWebRequest webRequest = (HttpWebRequest) WebRequest.Create(url); |
64 | webRequest.Timeout = 30000; //30 Second Timeout | 66 | webRequest.Timeout = 30000; //30 Second Timeout |
65 | MainLog.Instance.Debug("WEBLOADER", "Sending Download Request..."); | 67 | m_log.Debug("[WEBLOADER]: Sending Download Request..."); |
66 | HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse(); | 68 | HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse(); |
67 | MainLog.Instance.Debug("WEBLOADER", "Downloading Region Information From Remote Server..."); | 69 | m_log.Debug("[WEBLOADER]: Downloading Region Information From Remote Server..."); |
68 | StreamReader reader = new StreamReader(webResponse.GetResponseStream()); | 70 | StreamReader reader = new StreamReader(webResponse.GetResponseStream()); |
69 | string xmlSource = System.String.Empty; | 71 | string xmlSource = System.String.Empty; |
70 | string tempStr = reader.ReadLine(); | 72 | string tempStr = reader.ReadLine(); |
@@ -73,9 +75,8 @@ namespace OpenSim.Framework.RegionLoader.Web | |||
73 | xmlSource = xmlSource + tempStr; | 75 | xmlSource = xmlSource + tempStr; |
74 | tempStr = reader.ReadLine(); | 76 | tempStr = reader.ReadLine(); |
75 | } | 77 | } |
76 | MainLog.Instance.Debug("WEBLOADER", | 78 | m_log.Debug("[WEBLOADER]: Done downloading region information from server. Total Bytes: " + |
77 | "Done downloading region information from server. Total Bytes: " + | 79 | xmlSource.Length); |
78 | xmlSource.Length); | ||
79 | XmlDocument xmlDoc = new XmlDocument(); | 80 | XmlDocument xmlDoc = new XmlDocument(); |
80 | xmlDoc.LoadXml(xmlSource); | 81 | xmlDoc.LoadXml(xmlSource); |
81 | if (xmlDoc.FirstChild.Name == "Regions") | 82 | if (xmlDoc.FirstChild.Name == "Regions") |
@@ -84,7 +85,7 @@ namespace OpenSim.Framework.RegionLoader.Web | |||
84 | int i; | 85 | int i; |
85 | for (i = 0; i < xmlDoc.FirstChild.ChildNodes.Count; i++) | 86 | for (i = 0; i < xmlDoc.FirstChild.ChildNodes.Count; i++) |
86 | { | 87 | { |
87 | MainLog.Instance.Debug(xmlDoc.FirstChild.ChildNodes[i].OuterXml); | 88 | m_log.Debug(xmlDoc.FirstChild.ChildNodes[i].OuterXml); |
88 | regionInfos[i] = | 89 | regionInfos[i] = |
89 | new RegionInfo("REGION CONFIG #" + (i + 1), xmlDoc.FirstChild.ChildNodes[i],false); | 90 | new RegionInfo("REGION CONFIG #" + (i + 1), xmlDoc.FirstChild.ChildNodes[i],false); |
90 | } | 91 | } |
diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index df3b049..cc0c0d0 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs | |||
@@ -41,6 +41,8 @@ namespace OpenSim.Framework.Servers | |||
41 | { | 41 | { |
42 | public class BaseHttpServer | 42 | public class BaseHttpServer |
43 | { | 43 | { |
44 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
45 | |||
44 | protected Thread m_workerThread; | 46 | protected Thread m_workerThread; |
45 | protected HttpListener m_httpListener; | 47 | protected HttpListener m_httpListener; |
46 | protected Dictionary<string, XmlRpcMethod> m_rpcHandlers = new Dictionary<string, XmlRpcMethod>(); | 48 | protected Dictionary<string, XmlRpcMethod> m_rpcHandlers = new Dictionary<string, XmlRpcMethod>(); |
@@ -296,7 +298,7 @@ namespace OpenSim.Framework.Servers | |||
296 | } | 298 | } |
297 | catch (Exception ex) | 299 | catch (Exception ex) |
298 | { | 300 | { |
299 | MainLog.Instance.Warn("HTTPD", "Error - " + ex.Message); | 301 | m_log.Warn("[HTTPD]: Error - " + ex.Message); |
300 | } | 302 | } |
301 | finally | 303 | finally |
302 | { | 304 | { |
@@ -319,7 +321,7 @@ namespace OpenSim.Framework.Servers | |||
319 | LLSD llsdResponse = null; | 321 | LLSD llsdResponse = null; |
320 | 322 | ||
321 | try { llsdRequest = LLSDParser.DeserializeXml(requestBody); } | 323 | try { llsdRequest = LLSDParser.DeserializeXml(requestBody); } |
322 | catch (Exception ex) { MainLog.Instance.Warn("HTTPD", "Error - " + ex.Message); } | 324 | catch (Exception ex) { m_log.Warn("[HTTPD]: Error - " + ex.Message); } |
323 | 325 | ||
324 | if (llsdRequest != null && m_llsdHandler != null) | 326 | if (llsdRequest != null && m_llsdHandler != null) |
325 | { | 327 | { |
@@ -348,7 +350,7 @@ namespace OpenSim.Framework.Servers | |||
348 | } | 350 | } |
349 | catch (Exception ex) | 351 | catch (Exception ex) |
350 | { | 352 | { |
351 | MainLog.Instance.Warn("HTTPD", "Error - " + ex.Message); | 353 | m_log.Warn("[HTTPD]: Error - " + ex.Message); |
352 | } | 354 | } |
353 | finally | 355 | finally |
354 | { | 356 | { |
@@ -396,7 +398,7 @@ namespace OpenSim.Framework.Servers | |||
396 | 398 | ||
397 | foreach (string headername in rHeaders) | 399 | foreach (string headername in rHeaders) |
398 | { | 400 | { |
399 | //MainLog.Instance.Warn("HEADER", headername + "=" + request.Headers[headername]); | 401 | //m_log.Warn("[HEADER]: " + headername + "=" + request.Headers[headername]); |
400 | headervals[headername] = request.Headers[headername]; | 402 | headervals[headername] = request.Headers[headername]; |
401 | } | 403 | } |
402 | 404 | ||
@@ -407,9 +409,9 @@ namespace OpenSim.Framework.Servers | |||
407 | 409 | ||
408 | if (keysvals.Contains("method")) | 410 | if (keysvals.Contains("method")) |
409 | { | 411 | { |
410 | //MainLog.Instance.Warn("HTTP", "Contains Method"); | 412 | //m_log.Warn("[HTTP]: Contains Method"); |
411 | string method = (string) keysvals["method"]; | 413 | string method = (string) keysvals["method"]; |
412 | //MainLog.Instance.Warn("HTTP", requestBody); | 414 | //m_log.Warn("[HTTP]: " + requestBody); |
413 | GenericHTTPMethod requestprocessor; | 415 | GenericHTTPMethod requestprocessor; |
414 | bool foundHandler = TryGetHTTPHandler(method, out requestprocessor); | 416 | bool foundHandler = TryGetHTTPHandler(method, out requestprocessor); |
415 | if (foundHandler) | 417 | if (foundHandler) |
@@ -422,13 +424,13 @@ namespace OpenSim.Framework.Servers | |||
422 | } | 424 | } |
423 | else | 425 | else |
424 | { | 426 | { |
425 | //MainLog.Instance.Warn("HTTP", "Handler Not Found"); | 427 | //m_log.Warn("[HTTP]: Handler Not Found"); |
426 | SendHTML404(response, host); | 428 | SendHTML404(response, host); |
427 | } | 429 | } |
428 | } | 430 | } |
429 | else | 431 | else |
430 | { | 432 | { |
431 | //MainLog.Instance.Warn("HTTP", "No Method specified"); | 433 | //m_log.Warn("[HTTP]: No Method specified"); |
432 | SendHTML404(response, host); | 434 | SendHTML404(response, host); |
433 | } | 435 | } |
434 | } | 436 | } |
@@ -461,7 +463,7 @@ namespace OpenSim.Framework.Servers | |||
461 | } | 463 | } |
462 | catch (Exception ex) | 464 | catch (Exception ex) |
463 | { | 465 | { |
464 | MainLog.Instance.Warn("HTTPD", "Error - " + ex.Message); | 466 | m_log.Warn("[HTTPD]: Error - " + ex.Message); |
465 | } | 467 | } |
466 | finally | 468 | finally |
467 | { | 469 | { |
@@ -488,7 +490,7 @@ namespace OpenSim.Framework.Servers | |||
488 | } | 490 | } |
489 | catch (Exception ex) | 491 | catch (Exception ex) |
490 | { | 492 | { |
491 | MainLog.Instance.Warn("HTTPD", "Error - " + ex.Message); | 493 | m_log.Warn("[HTTPD]: Error - " + ex.Message); |
492 | } | 494 | } |
493 | finally | 495 | finally |
494 | { | 496 | { |
@@ -513,7 +515,7 @@ namespace OpenSim.Framework.Servers | |||
513 | } | 515 | } |
514 | catch (Exception ex) | 516 | catch (Exception ex) |
515 | { | 517 | { |
516 | MainLog.Instance.Warn("HTTPD", "Error - " + ex.Message); | 518 | m_log.Warn("[HTTPD]: Error - " + ex.Message); |
517 | } | 519 | } |
518 | finally | 520 | finally |
519 | { | 521 | { |
@@ -523,7 +525,7 @@ namespace OpenSim.Framework.Servers | |||
523 | 525 | ||
524 | public void Start() | 526 | public void Start() |
525 | { | 527 | { |
526 | MainLog.Instance.Verbose("HTTPD", "Starting up HTTP Server"); | 528 | m_log.Info("[HTTPD]: Starting up HTTP Server"); |
527 | 529 | ||
528 | m_workerThread = new Thread(new ThreadStart(StartHTTP)); | 530 | m_workerThread = new Thread(new ThreadStart(StartHTTP)); |
529 | m_workerThread.IsBackground = true; | 531 | m_workerThread.IsBackground = true; |
@@ -534,7 +536,7 @@ namespace OpenSim.Framework.Servers | |||
534 | { | 536 | { |
535 | try | 537 | try |
536 | { | 538 | { |
537 | MainLog.Instance.Verbose("HTTPD", "Spawned main thread OK"); | 539 | m_log.Info("[HTTPD]: Spawned main thread OK"); |
538 | m_httpListener = new HttpListener(); | 540 | m_httpListener = new HttpListener(); |
539 | 541 | ||
540 | if (!m_ssl) | 542 | if (!m_ssl) |
@@ -556,7 +558,7 @@ namespace OpenSim.Framework.Servers | |||
556 | } | 558 | } |
557 | catch (Exception e) | 559 | catch (Exception e) |
558 | { | 560 | { |
559 | MainLog.Instance.Warn("HTTPD", "Error - " + e.Message); | 561 | m_log.Warn("[HTTPD]: Error - " + e.Message); |
560 | } | 562 | } |
561 | } | 563 | } |
562 | 564 | ||
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index 3016715..4831446 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) Contributors, http://opensimulator.org/ | 2 | * Copyright (c) Contributors, http://opensimulator.org/ |
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | 3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. |
4 | * | 4 | * |
@@ -27,7 +27,6 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | |||
31 | using OpenSim.Framework.Console; | 30 | using OpenSim.Framework.Console; |
32 | 31 | ||
33 | namespace OpenSim.Framework.Servers | 32 | namespace OpenSim.Framework.Servers |
@@ -37,8 +36,7 @@ namespace OpenSim.Framework.Servers | |||
37 | /// </summary> | 36 | /// </summary> |
38 | public abstract class BaseOpenSimServer | 37 | public abstract class BaseOpenSimServer |
39 | { | 38 | { |
40 | protected LogBase m_log; | 39 | protected ConsoleBase m_console; |
41 | |||
42 | protected DateTime m_startuptime; | 40 | protected DateTime m_startuptime; |
43 | 41 | ||
44 | public BaseOpenSimServer() | 42 | public BaseOpenSimServer() |
@@ -56,7 +54,7 @@ namespace OpenSim.Framework.Servers | |||
56 | switch (command) | 54 | switch (command) |
57 | { | 55 | { |
58 | case "help": | 56 | case "help": |
59 | m_log.Notice("show uptime - show server startup and uptime."); | 57 | m_console.Notice("show uptime - show server startup and uptime."); |
60 | break; | 58 | break; |
61 | 59 | ||
62 | case "show": | 60 | case "show": |
@@ -77,8 +75,8 @@ namespace OpenSim.Framework.Servers | |||
77 | switch (ShowWhat) | 75 | switch (ShowWhat) |
78 | { | 76 | { |
79 | case "uptime": | 77 | case "uptime": |
80 | m_log.Notice("Server has been running since " + m_startuptime.ToString()); | 78 | m_console.Notice("Server has been running since " + m_startuptime.ToString()); |
81 | m_log.Notice("That is " + (DateTime.Now - m_startuptime).ToString()); | 79 | m_console.Notice("That is " + (DateTime.Now - m_startuptime).ToString()); |
82 | break; | 80 | break; |
83 | } | 81 | } |
84 | } | 82 | } |
diff --git a/OpenSim/Framework/Servers/CheckSumServer.cs b/OpenSim/Framework/Servers/CheckSumServer.cs index 47b3f24..6599d86 100644 --- a/OpenSim/Framework/Servers/CheckSumServer.cs +++ b/OpenSim/Framework/Servers/CheckSumServer.cs | |||
@@ -31,7 +31,7 @@ namespace OpenSim.Framework.Servers | |||
31 | /* | 31 | /* |
32 | public class CheckSumServer : UDPServerBase | 32 | public class CheckSumServer : UDPServerBase |
33 | { | 33 | { |
34 | //protected ConsoleBase m_log; | 34 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
35 | 35 | ||
36 | public CheckSumServer(int port) | 36 | public CheckSumServer(int port) |
37 | : base(port) | 37 | : base(port) |
@@ -114,7 +114,7 @@ namespace OpenSim.Framework.Servers | |||
114 | } | 114 | } |
115 | catch (Exception) | 115 | catch (Exception) |
116 | { | 116 | { |
117 | MainLog.Instance.Warn("CheckSumServer.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection "); | 117 | m_log.Warn("CheckSumServer.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection "); |
118 | } | 118 | } |
119 | } | 119 | } |
120 | 120 | ||
diff --git a/OpenSim/Framework/UserConfig.cs b/OpenSim/Framework/UserConfig.cs index a4b8a5d..3a2f384 100644 --- a/OpenSim/Framework/UserConfig.cs +++ b/OpenSim/Framework/UserConfig.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | 29 | using System; |
30 | using OpenSim.Framework.Console; | ||
30 | 31 | ||
31 | namespace OpenSim.Framework | 32 | namespace OpenSim.Framework |
32 | { | 33 | { |
diff --git a/OpenSim/Grid/AssetServer/Main.cs b/OpenSim/Grid/AssetServer/Main.cs index a95ea71..35e6495 100644 --- a/OpenSim/Grid/AssetServer/Main.cs +++ b/OpenSim/Grid/AssetServer/Main.cs | |||
@@ -43,6 +43,8 @@ namespace OpenSim.Grid.AssetServer | |||
43 | /// </summary> | 43 | /// </summary> |
44 | public class OpenAsset_Main : BaseOpenSimServer, conscmd_callback | 44 | public class OpenAsset_Main : BaseOpenSimServer, conscmd_callback |
45 | { | 45 | { |
46 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
47 | |||
46 | public AssetConfig m_config; | 48 | public AssetConfig m_config; |
47 | 49 | ||
48 | public static OpenAsset_Main assetserver; | 50 | public static OpenAsset_Main assetserver; |
@@ -55,7 +57,9 @@ namespace OpenSim.Grid.AssetServer | |||
55 | [STAThread] | 57 | [STAThread] |
56 | public static void Main(string[] args) | 58 | public static void Main(string[] args) |
57 | { | 59 | { |
58 | Console.WriteLine("Starting...\n"); | 60 | log4net.Config.XmlConfigurator.Configure(); |
61 | |||
62 | m_log.Info("Starting...\n"); | ||
59 | 63 | ||
60 | assetserver = new OpenAsset_Main(); | 64 | assetserver = new OpenAsset_Main(); |
61 | assetserver.Startup(); | 65 | assetserver.Startup(); |
@@ -65,42 +69,32 @@ namespace OpenSim.Grid.AssetServer | |||
65 | 69 | ||
66 | private void Work() | 70 | private void Work() |
67 | { | 71 | { |
68 | m_log.Notice("Enter help for a list of commands"); | 72 | m_console.Notice("Enter help for a list of commands"); |
69 | 73 | ||
70 | while (true) | 74 | while (true) |
71 | { | 75 | { |
72 | m_log.MainLogPrompt(); | 76 | m_console.Prompt(); |
73 | } | 77 | } |
74 | } | 78 | } |
75 | 79 | ||
76 | private OpenAsset_Main() | 80 | private OpenAsset_Main() |
77 | { | 81 | { |
78 | if (!Directory.Exists(Util.logDir())) | 82 | m_console = new ConsoleBase("OpenAsset", this); |
79 | { | ||
80 | Directory.CreateDirectory(Util.logDir()); | ||
81 | } | ||
82 | |||
83 | m_log = | ||
84 | new LogBase( | ||
85 | (Path.Combine(Util.logDir(), "opengrid-AssetServer-console.log")), | ||
86 | "OpenAsset", | ||
87 | this, | ||
88 | true); | ||
89 | 83 | ||
90 | MainLog.Instance = m_log; | 84 | MainConsole.Instance = m_console; |
91 | } | 85 | } |
92 | 86 | ||
93 | public void Startup() | 87 | public void Startup() |
94 | { | 88 | { |
95 | m_config = new AssetConfig("ASSET SERVER", (Path.Combine(Util.configDir(), "AssetServer_Config.xml"))); | 89 | m_config = new AssetConfig("ASSET SERVER", (Path.Combine(Util.configDir(), "AssetServer_Config.xml"))); |
96 | 90 | ||
97 | m_log.Verbose("ASSET", "Setting up asset DB"); | 91 | m_log.Info("[ASSET]: Setting up asset DB"); |
98 | setupDB(m_config); | 92 | setupDB(m_config); |
99 | 93 | ||
100 | m_log.Verbose("ASSET", "Loading default asset set.."); | 94 | m_log.Info("[ASSET]: Loading default asset set.."); |
101 | LoadDefaultAssets(); | 95 | LoadDefaultAssets(); |
102 | 96 | ||
103 | m_log.Verbose("ASSET", "Starting HTTP process"); | 97 | m_log.Info("[ASSET]: Starting HTTP process"); |
104 | BaseHttpServer httpServer = new BaseHttpServer(m_config.HttpPort); | 98 | BaseHttpServer httpServer = new BaseHttpServer(m_config.HttpPort); |
105 | 99 | ||
106 | StatsManager.StartCollectingAssetStats(); | 100 | StatsManager.StartCollectingAssetStats(); |
@@ -118,7 +112,7 @@ namespace OpenSim.Grid.AssetServer | |||
118 | 112 | ||
119 | public IAssetProvider LoadDatabasePlugin(string FileName) | 113 | public IAssetProvider LoadDatabasePlugin(string FileName) |
120 | { | 114 | { |
121 | MainLog.Instance.Verbose("ASSET SERVER", "LoadDatabasePlugin: Attempting to load " + FileName); | 115 | m_log.Info("[ASSET SERVER]: LoadDatabasePlugin: Attempting to load " + FileName); |
122 | Assembly pluginAssembly = Assembly.LoadFrom(FileName); | 116 | Assembly pluginAssembly = Assembly.LoadFrom(FileName); |
123 | IAssetProvider assetPlugin = null; | 117 | IAssetProvider assetPlugin = null; |
124 | foreach (Type pluginType in pluginAssembly.GetTypes()) | 118 | foreach (Type pluginType in pluginAssembly.GetTypes()) |
@@ -134,7 +128,7 @@ namespace OpenSim.Grid.AssetServer | |||
134 | assetPlugin = plug; | 128 | assetPlugin = plug; |
135 | assetPlugin.Initialise(); | 129 | assetPlugin.Initialise(); |
136 | 130 | ||
137 | MainLog.Instance.Verbose("ASSET SERVER", "Added " + assetPlugin.Name + " " + assetPlugin.Version); | 131 | m_log.Info("[ASSET SERVER]: Added " + assetPlugin.Name + " " + assetPlugin.Version); |
138 | break; | 132 | break; |
139 | } | 133 | } |
140 | 134 | ||
@@ -153,14 +147,14 @@ namespace OpenSim.Grid.AssetServer | |||
153 | m_assetProvider = LoadDatabasePlugin(config.DatabaseProvider); | 147 | m_assetProvider = LoadDatabasePlugin(config.DatabaseProvider); |
154 | if (m_assetProvider == null) | 148 | if (m_assetProvider == null) |
155 | { | 149 | { |
156 | MainLog.Instance.Error("ASSET", "Failed to load a database plugin, server halting"); | 150 | m_log.Error("[ASSET]: Failed to load a database plugin, server halting"); |
157 | Environment.Exit(-1); | 151 | Environment.Exit(-1); |
158 | } | 152 | } |
159 | } | 153 | } |
160 | catch (Exception e) | 154 | catch (Exception e) |
161 | { | 155 | { |
162 | MainLog.Instance.Warn("ASSET", "setupDB() - Exception occured"); | 156 | m_log.Warn("[ASSET]: setupDB() - Exception occured"); |
163 | MainLog.Instance.Warn("ASSET", e.ToString()); | 157 | m_log.Warn("[ASSET]: " + e.ToString()); |
164 | } | 158 | } |
165 | } | 159 | } |
166 | 160 | ||
@@ -181,18 +175,18 @@ namespace OpenSim.Grid.AssetServer | |||
181 | switch (cmd) | 175 | switch (cmd) |
182 | { | 176 | { |
183 | case "help": | 177 | case "help": |
184 | m_log.Notice( | 178 | m_console.Notice( |
185 | @"shutdown - shutdown this asset server (USE CAUTION!) | 179 | @"shutdown - shutdown this asset server (USE CAUTION!) |
186 | stats - statistical information for this server"); | 180 | stats - statistical information for this server"); |
187 | 181 | ||
188 | break; | 182 | break; |
189 | 183 | ||
190 | case "stats": | 184 | case "stats": |
191 | m_log.Notice("STATS", Environment.NewLine + StatsManager.AssetStats.Report()); | 185 | m_console.Notice("STATS", Environment.NewLine + StatsManager.AssetStats.Report()); |
192 | break; | 186 | break; |
193 | 187 | ||
194 | case "shutdown": | 188 | case "shutdown": |
195 | m_log.Close(); | 189 | m_console.Close(); |
196 | Environment.Exit(0); | 190 | Environment.Exit(0); |
197 | break; | 191 | break; |
198 | } | 192 | } |
diff --git a/OpenSim/Grid/AssetServer/RestService.cs b/OpenSim/Grid/AssetServer/RestService.cs index 5c497b6..cb9e1ae 100644 --- a/OpenSim/Grid/AssetServer/RestService.cs +++ b/OpenSim/Grid/AssetServer/RestService.cs | |||
@@ -41,6 +41,8 @@ namespace OpenSim.Grid.AssetServer | |||
41 | { | 41 | { |
42 | public class GetAssetStreamHandler : BaseStreamHandler | 42 | public class GetAssetStreamHandler : BaseStreamHandler |
43 | { | 43 | { |
44 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
45 | |||
44 | private OpenAsset_Main m_assetManager; | 46 | private OpenAsset_Main m_assetManager; |
45 | private IAssetProvider m_assetProvider; | 47 | private IAssetProvider m_assetProvider; |
46 | 48 | ||
@@ -52,7 +54,7 @@ namespace OpenSim.Grid.AssetServer | |||
52 | public GetAssetStreamHandler(OpenAsset_Main assetManager, IAssetProvider assetProvider) | 54 | public GetAssetStreamHandler(OpenAsset_Main assetManager, IAssetProvider assetProvider) |
53 | : base("GET", "/assets") | 55 | : base("GET", "/assets") |
54 | { | 56 | { |
55 | MainLog.Instance.Verbose("REST", "In Get Request"); | 57 | m_log.Info("[REST]: In Get Request"); |
56 | m_assetManager = assetManager; | 58 | m_assetManager = assetManager; |
57 | m_assetProvider = assetProvider; | 59 | m_assetProvider = assetProvider; |
58 | } | 60 | } |
@@ -71,8 +73,8 @@ namespace OpenSim.Grid.AssetServer | |||
71 | 73 | ||
72 | if (!LLUUID.TryParse(p[0], out assetID)) | 74 | if (!LLUUID.TryParse(p[0], out assetID)) |
73 | { | 75 | { |
74 | MainLog.Instance.Verbose( | 76 | m_log.Info(String.Format( |
75 | "REST", "GET:/asset ignoring request with malformed UUID {0}", p[0]); | 77 | "[REST]: GET:/asset ignoring request with malformed UUID {0}", p[0])); |
76 | return result; | 78 | return result; |
77 | } | 79 | } |
78 | 80 | ||
@@ -94,10 +96,9 @@ namespace OpenSim.Grid.AssetServer | |||
94 | 96 | ||
95 | result = ms.GetBuffer(); | 97 | result = ms.GetBuffer(); |
96 | 98 | ||
97 | MainLog.Instance.Verbose( | 99 | m_log.Info(String.Format( |
98 | "REST", | 100 | "[REST]: GET:/asset found {0} with name {1}, size {2} bytes", |
99 | "GET:/asset found {0} with name {1}, size {2} bytes", | 101 | assetID, asset.Name, result.Length)); |
100 | assetID, asset.Name, result.Length); | ||
101 | 102 | ||
102 | Array.Resize<byte>(ref result, (int) ms.Length); | 103 | Array.Resize<byte>(ref result, (int) ms.Length); |
103 | } | 104 | } |
@@ -106,13 +107,13 @@ namespace OpenSim.Grid.AssetServer | |||
106 | if (StatsManager.AssetStats != null) | 107 | if (StatsManager.AssetStats != null) |
107 | StatsManager.AssetStats.AddNotFoundRequest(); | 108 | StatsManager.AssetStats.AddNotFoundRequest(); |
108 | 109 | ||
109 | MainLog.Instance.Verbose("REST", "GET:/asset failed to find {0}", assetID); | 110 | m_log.Info(String.Format("[REST]: GET:/asset failed to find {0}", assetID)); |
110 | } | 111 | } |
111 | } | 112 | } |
112 | } | 113 | } |
113 | catch (Exception e) | 114 | catch (Exception e) |
114 | { | 115 | { |
115 | MainLog.Instance.Error(e.ToString()); | 116 | m_log.Error(e.ToString()); |
116 | } | 117 | } |
117 | return result; | 118 | return result; |
118 | } | 119 | } |
@@ -120,6 +121,8 @@ namespace OpenSim.Grid.AssetServer | |||
120 | 121 | ||
121 | public class PostAssetStreamHandler : BaseStreamHandler | 122 | public class PostAssetStreamHandler : BaseStreamHandler |
122 | { | 123 | { |
124 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
125 | |||
123 | private OpenAsset_Main m_assetManager; | 126 | private OpenAsset_Main m_assetManager; |
124 | private IAssetProvider m_assetProvider; | 127 | private IAssetProvider m_assetProvider; |
125 | 128 | ||
@@ -135,7 +138,7 @@ namespace OpenSim.Grid.AssetServer | |||
135 | XmlSerializer xs = new XmlSerializer(typeof (AssetBase)); | 138 | XmlSerializer xs = new XmlSerializer(typeof (AssetBase)); |
136 | AssetBase asset = (AssetBase) xs.Deserialize(request); | 139 | AssetBase asset = (AssetBase) xs.Deserialize(request); |
137 | 140 | ||
138 | MainLog.Instance.Verbose("REST", "StoreAndCommitAsset {0}", asset.FullID); | 141 | m_log.Info(String.Format("[REST]: StoreAndCommitAsset {0}", asset.FullID)); |
139 | m_assetProvider.CreateAsset(asset); | 142 | m_assetProvider.CreateAsset(asset); |
140 | m_assetProvider.CommitAssets(); | 143 | m_assetProvider.CommitAssets(); |
141 | 144 | ||
diff --git a/OpenSim/Grid/GridServer.Config/DbGridConfig.cs b/OpenSim/Grid/GridServer.Config/DbGridConfig.cs index e8225e1..5dde43d 100644 --- a/OpenSim/Grid/GridServer.Config/DbGridConfig.cs +++ b/OpenSim/Grid/GridServer.Config/DbGridConfig.cs | |||
@@ -38,13 +38,15 @@ namespace OpenGrid.Config.GridConfigDb4o | |||
38 | /// </summary> | 38 | /// </summary> |
39 | public class Db40ConfigPlugin: IGridConfig | 39 | public class Db40ConfigPlugin: IGridConfig |
40 | { | 40 | { |
41 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
41 | /// <summary> | 43 | /// <summary> |
42 | /// Loads and returns a configuration objeect | 44 | /// Loads and returns a configuration objeect |
43 | /// </summary> | 45 | /// </summary> |
44 | /// <returns>A grid configuration object</returns> | 46 | /// <returns>A grid configuration object</returns> |
45 | public GridConfig GetConfigObject() | 47 | public GridConfig GetConfigObject() |
46 | { | 48 | { |
47 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Loading Db40Config dll"); | 49 | m_log.Info("[DBGRIDCONFIG]: Loading Db40Config dll"); |
48 | return new DbGridConfig(); | 50 | return new DbGridConfig(); |
49 | } | 51 | } |
50 | } | 52 | } |
@@ -64,24 +66,24 @@ namespace OpenGrid.Config.GridConfigDb4o | |||
64 | /// </summary> | 66 | /// </summary> |
65 | public void LoadDefaults() | 67 | public void LoadDefaults() |
66 | { | 68 | { |
67 | MainLog.Instance.Notice("DbGridConfig.cs:LoadDefaults() - Please press enter to retain default or enter new settings"); | 69 | MainConsole.Instance.Info("DbGridConfig.cs:LoadDefaults() - Please press enter to retain default or enter new settings"); |
68 | 70 | ||
69 | // About the grid options | 71 | // About the grid options |
70 | this.GridOwner = MainLog.Instance.CmdPrompt("Grid owner", "OGS development team"); | 72 | this.GridOwner = MainConsole.Instance.CmdPrompt("Grid owner", "OGS development team"); |
71 | 73 | ||
72 | // Asset Options | 74 | // Asset Options |
73 | this.DefaultAssetServer = MainLog.Instance.CmdPrompt("Default asset server","http://127.0.0.1:" + AssetConfig.DefaultHttpPort.ToString() + "/"); | 75 | this.DefaultAssetServer = MainConsole.Instance.CmdPrompt("Default asset server","http://127.0.0.1:" + AssetConfig.DefaultHttpPort.ToString() + "/"); |
74 | this.AssetSendKey = MainLog.Instance.CmdPrompt("Key to send to asset server","null"); | 76 | this.AssetSendKey = MainConsole.Instance.CmdPrompt("Key to send to asset server","null"); |
75 | this.AssetRecvKey = MainLog.Instance.CmdPrompt("Key to expect from asset server","null"); | 77 | this.AssetRecvKey = MainConsole.Instance.CmdPrompt("Key to expect from asset server","null"); |
76 | 78 | ||
77 | // User Server Options | 79 | // User Server Options |
78 | this.DefaultUserServer = MainLog.Instance.CmdPrompt("Default user server","http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString() + "/"); | 80 | this.DefaultUserServer = MainConsole.Instance.CmdPrompt("Default user server","http://127.0.0.1:" + UserConfig.DefaultHttpPort.ToString() + "/"); |
79 | this.UserSendKey = MainLog.Instance.CmdPrompt("Key to send to user server","null"); | 81 | this.UserSendKey = MainConsole.Instance.CmdPrompt("Key to send to user server","null"); |
80 | this.UserRecvKey = MainLog.Instance.CmdPrompt("Key to expect from user server","null"); | 82 | this.UserRecvKey = MainConsole.Instance.CmdPrompt("Key to expect from user server","null"); |
81 | 83 | ||
82 | // Region Server Options | 84 | // Region Server Options |
83 | this.SimSendKey = MainLog.Instance.CmdPrompt("Key to send to sims","null"); | 85 | this.SimSendKey = MainConsole.Instance.CmdPrompt("Key to send to sims","null"); |
84 | this.SimRecvKey = MainLog.Instance.CmdPrompt("Key to expect from sims","null"); | 86 | this.SimRecvKey = MainConsole.Instance.CmdPrompt("Key to expect from sims","null"); |
85 | } | 87 | } |
86 | 88 | ||
87 | /// <summary> | 89 | /// <summary> |
@@ -99,7 +101,7 @@ namespace OpenGrid.Config.GridConfigDb4o | |||
99 | // Found? | 101 | // Found? |
100 | if (result.Count==1) | 102 | if (result.Count==1) |
101 | { | 103 | { |
102 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Found a GridConfig object in the local database, loading"); | 104 | m_log.Info("[DBGRIDCONFIG]: Found a GridConfig object in the local database, loading"); |
103 | foreach (DbGridConfig cfg in result) | 105 | foreach (DbGridConfig cfg in result) |
104 | { | 106 | { |
105 | // Import each setting into this class | 107 | // Import each setting into this class |
@@ -121,13 +123,13 @@ namespace OpenGrid.Config.GridConfigDb4o | |||
121 | } | 123 | } |
122 | else | 124 | else |
123 | { | 125 | { |
124 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Could not find object in database, loading precompiled defaults"); | 126 | m_log.Info("[DBGRIDCONFIG]: Could not find object in database, loading precompiled defaults"); |
125 | 127 | ||
126 | // Load default settings into this class | 128 | // Load default settings into this class |
127 | LoadDefaults(); | 129 | LoadDefaults(); |
128 | 130 | ||
129 | // Saves to the database file... | 131 | // Saves to the database file... |
130 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Writing out default settings to local database"); | 132 | m_log.Info("[DBGRIDCONFIG]: Writing out default settings to local database"); |
131 | db.Set(this); | 133 | db.Set(this); |
132 | 134 | ||
133 | // Closes file locks | 135 | // Closes file locks |
@@ -136,27 +138,27 @@ namespace OpenGrid.Config.GridConfigDb4o | |||
136 | } | 138 | } |
137 | catch(Exception e) | 139 | catch(Exception e) |
138 | { | 140 | { |
139 | MainLog.Instance.Warn("DbGridConfig.cs:InitConfig() - Exception occured"); | 141 | m_log.Warn("DbGridConfig.cs:InitConfig() - Exception occured"); |
140 | MainLog.Instance.Warn(e.ToString()); | 142 | m_log.Warn(e.ToString()); |
141 | } | 143 | } |
142 | 144 | ||
143 | // Grid Settings | 145 | // Grid Settings |
144 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Grid settings loaded:"); | 146 | m_log.Info("[DBGRIDCONFIG]: Grid settings loaded:"); |
145 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Grid owner: " + this.GridOwner); | 147 | m_log.Info("[DBGRIDCONFIG]: Grid owner: " + this.GridOwner); |
146 | 148 | ||
147 | // Asset Settings | 149 | // Asset Settings |
148 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Default asset server: " + this.DefaultAssetServer); | 150 | m_log.Info("[DBGRIDCONFIG]: Default asset server: " + this.DefaultAssetServer); |
149 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Key to send to asset server: " + this.AssetSendKey); | 151 | m_log.Info("[DBGRIDCONFIG]: Key to send to asset server: " + this.AssetSendKey); |
150 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Key to expect from asset server: " + this.AssetRecvKey); | 152 | m_log.Info("[DBGRIDCONFIG]: Key to expect from asset server: " + this.AssetRecvKey); |
151 | 153 | ||
152 | // User Settings | 154 | // User Settings |
153 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Default user server: " + this.DefaultUserServer); | 155 | m_log.Info("[DBGRIDCONFIG]: Default user server: " + this.DefaultUserServer); |
154 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Key to send to user server: " + this.UserSendKey); | 156 | m_log.Info("[DBGRIDCONFIG]: Key to send to user server: " + this.UserSendKey); |
155 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Key to expect from user server: " + this.UserRecvKey); | 157 | m_log.Info("[DBGRIDCONFIG]: Key to expect from user server: " + this.UserRecvKey); |
156 | 158 | ||
157 | // Region Settings | 159 | // Region Settings |
158 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Key to send to sims: " + this.SimSendKey); | 160 | m_log.Info("[DBGRIDCONFIG]: Key to send to sims: " + this.SimSendKey); |
159 | MainLog.Instance.Verbose("DBGRIDCONFIG", "Key to expect from sims: " + this.SimRecvKey); | 161 | m_log.Info("[DBGRIDCONFIG]: Key to expect from sims: " + this.SimRecvKey); |
160 | } | 162 | } |
161 | 163 | ||
162 | /// <summary> | 164 | /// <summary> |
diff --git a/OpenSim/Grid/GridServer/GridManager.cs b/OpenSim/Grid/GridServer/GridManager.cs index c956a01..49b9aa2 100644 --- a/OpenSim/Grid/GridServer/GridManager.cs +++ b/OpenSim/Grid/GridServer/GridManager.cs | |||
@@ -38,11 +38,12 @@ using OpenSim.Framework.Console; | |||
38 | using OpenSim.Framework.Data; | 38 | using OpenSim.Framework.Data; |
39 | using OpenSim.Framework.Servers; | 39 | using OpenSim.Framework.Servers; |
40 | 40 | ||
41 | |||
42 | namespace OpenSim.Grid.GridServer | 41 | namespace OpenSim.Grid.GridServer |
43 | { | 42 | { |
44 | internal class GridManager | 43 | internal class GridManager |
45 | { | 44 | { |
45 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | |||
46 | private Dictionary<string, IGridData> _plugins = new Dictionary<string, IGridData>(); | 47 | private Dictionary<string, IGridData> _plugins = new Dictionary<string, IGridData>(); |
47 | private Dictionary<string, ILogData> _logplugins = new Dictionary<string, ILogData>(); | 48 | private Dictionary<string, ILogData> _logplugins = new Dictionary<string, ILogData>(); |
48 | 49 | ||
@@ -57,10 +58,10 @@ namespace OpenSim.Grid.GridServer | |||
57 | /// <param name="FileName">The filename to the grid server plugin DLL</param> | 58 | /// <param name="FileName">The filename to the grid server plugin DLL</param> |
58 | public void AddPlugin(string FileName) | 59 | public void AddPlugin(string FileName) |
59 | { | 60 | { |
60 | MainLog.Instance.Verbose("DATA", "Attempting to load " + FileName); | 61 | m_log.Info("[DATA]: Attempting to load " + FileName); |
61 | Assembly pluginAssembly = Assembly.LoadFrom(FileName); | 62 | Assembly pluginAssembly = Assembly.LoadFrom(FileName); |
62 | 63 | ||
63 | MainLog.Instance.Verbose("DATA", "Found " + pluginAssembly.GetTypes().Length + " interfaces."); | 64 | m_log.Info("[DATA]: Found " + pluginAssembly.GetTypes().Length + " interfaces."); |
64 | foreach (Type pluginType in pluginAssembly.GetTypes()) | 65 | foreach (Type pluginType in pluginAssembly.GetTypes()) |
65 | { | 66 | { |
66 | if (!pluginType.IsAbstract) | 67 | if (!pluginType.IsAbstract) |
@@ -74,7 +75,7 @@ namespace OpenSim.Grid.GridServer | |||
74 | (IGridData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | 75 | (IGridData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); |
75 | plug.Initialise(); | 76 | plug.Initialise(); |
76 | _plugins.Add(plug.getName(), plug); | 77 | _plugins.Add(plug.getName(), plug); |
77 | MainLog.Instance.Verbose("DATA", "Added IGridData Interface"); | 78 | m_log.Info("[DATA]: Added IGridData Interface"); |
78 | } | 79 | } |
79 | 80 | ||
80 | typeInterface = null; | 81 | typeInterface = null; |
@@ -88,7 +89,7 @@ namespace OpenSim.Grid.GridServer | |||
88 | (ILogData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | 89 | (ILogData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); |
89 | plug.Initialise(); | 90 | plug.Initialise(); |
90 | _logplugins.Add(plug.getName(), plug); | 91 | _logplugins.Add(plug.getName(), plug); |
91 | MainLog.Instance.Verbose("DATA", "Added ILogData Interface"); | 92 | m_log.Info("[DATA]: Added ILogData Interface"); |
92 | } | 93 | } |
93 | 94 | ||
94 | typeInterface = null; | 95 | typeInterface = null; |
@@ -116,7 +117,7 @@ namespace OpenSim.Grid.GridServer | |||
116 | } | 117 | } |
117 | catch (Exception) | 118 | catch (Exception) |
118 | { | 119 | { |
119 | MainLog.Instance.Warn("storage", "Unable to write log via " + kvp.Key); | 120 | m_log.Warn("[storage]: Unable to write log via " + kvp.Key); |
120 | } | 121 | } |
121 | } | 122 | } |
122 | } | 123 | } |
@@ -136,7 +137,7 @@ namespace OpenSim.Grid.GridServer | |||
136 | } | 137 | } |
137 | catch (Exception e) | 138 | catch (Exception e) |
138 | { | 139 | { |
139 | MainLog.Instance.Warn("storage", "getRegion - " + e.Message); | 140 | m_log.Warn("[storage]: getRegion - " + e.Message); |
140 | } | 141 | } |
141 | } | 142 | } |
142 | return null; | 143 | return null; |
@@ -157,7 +158,7 @@ namespace OpenSim.Grid.GridServer | |||
157 | } | 158 | } |
158 | catch | 159 | catch |
159 | { | 160 | { |
160 | MainLog.Instance.Warn("storage", "Unable to find region " + handle.ToString() + " via " + kvp.Key); | 161 | m_log.Warn("[storage]: Unable to find region " + handle.ToString() + " via " + kvp.Key); |
161 | } | 162 | } |
162 | } | 163 | } |
163 | return null; | 164 | return null; |
@@ -179,7 +180,7 @@ namespace OpenSim.Grid.GridServer | |||
179 | } | 180 | } |
180 | catch | 181 | catch |
181 | { | 182 | { |
182 | MainLog.Instance.Warn("storage", "Unable to query regionblock via " + kvp.Key); | 183 | m_log.Warn("[storage]: Unable to query regionblock via " + kvp.Key); |
183 | } | 184 | } |
184 | } | 185 | } |
185 | 186 | ||
@@ -245,14 +246,14 @@ namespace OpenSim.Grid.GridServer | |||
245 | } | 246 | } |
246 | else | 247 | else |
247 | { | 248 | { |
248 | MainLog.Instance.Verbose("GRID", "Region connected without a UUID, ignoring."); | 249 | m_log.Info("[GRID]: Region connected without a UUID, ignoring."); |
249 | responseData["error"] = "No UUID passed to grid server - unable to connect you"; | 250 | responseData["error"] = "No UUID passed to grid server - unable to connect you"; |
250 | return response; | 251 | return response; |
251 | } | 252 | } |
252 | 253 | ||
253 | if (TheSim == null) // Shouldnt this be in the REST Simulator Set method? | 254 | if (TheSim == null) // Shouldnt this be in the REST Simulator Set method? |
254 | { | 255 | { |
255 | MainLog.Instance.Verbose("GRID", "New region connecting"); | 256 | m_log.Info("[GRID]: New region connecting"); |
256 | myword = "creation"; | 257 | myword = "creation"; |
257 | } | 258 | } |
258 | else | 259 | else |
@@ -320,7 +321,7 @@ namespace OpenSim.Grid.GridServer | |||
320 | (OldSim.regionRecvKey == TheSim.regionRecvKey && | 321 | (OldSim.regionRecvKey == TheSim.regionRecvKey && |
321 | OldSim.regionSendKey == TheSim.regionSendKey)) | 322 | OldSim.regionSendKey == TheSim.regionSendKey)) |
322 | { | 323 | { |
323 | MainLog.Instance.Verbose("GRID", "Adding region " + TheSim.regionLocX + " , " + TheSim.regionLocY + " , " + | 324 | m_log.Info("[GRID]: Adding region " + TheSim.regionLocX + " , " + TheSim.regionLocY + " , " + |
324 | TheSim.serverURI); | 325 | TheSim.serverURI); |
325 | foreach (KeyValuePair<string, IGridData> kvp in _plugins) | 326 | foreach (KeyValuePair<string, IGridData> kvp in _plugins) |
326 | { | 327 | { |
@@ -330,17 +331,17 @@ namespace OpenSim.Grid.GridServer | |||
330 | switch (insertResponse) | 331 | switch (insertResponse) |
331 | { | 332 | { |
332 | case DataResponse.RESPONSE_OK: | 333 | case DataResponse.RESPONSE_OK: |
333 | MainLog.Instance.Verbose("grid", "New sim " + myword + " successful: " + TheSim.regionName); | 334 | m_log.Info("[grid]: New sim " + myword + " successful: " + TheSim.regionName); |
334 | break; | 335 | break; |
335 | case DataResponse.RESPONSE_ERROR: | 336 | case DataResponse.RESPONSE_ERROR: |
336 | MainLog.Instance.Warn("storage", "New sim creation failed (Error): " + TheSim.regionName); | 337 | m_log.Warn("[storage]: New sim creation failed (Error): " + TheSim.regionName); |
337 | break; | 338 | break; |
338 | case DataResponse.RESPONSE_INVALIDCREDENTIALS: | 339 | case DataResponse.RESPONSE_INVALIDCREDENTIALS: |
339 | MainLog.Instance.Warn("storage", | 340 | m_log.Warn("[storage]: " + |
340 | "New sim creation failed (Invalid Credentials): " + TheSim.regionName); | 341 | "New sim creation failed (Invalid Credentials): " + TheSim.regionName); |
341 | break; | 342 | break; |
342 | case DataResponse.RESPONSE_AUTHREQUIRED: | 343 | case DataResponse.RESPONSE_AUTHREQUIRED: |
343 | MainLog.Instance.Warn("storage", | 344 | m_log.Warn("[storage]: " + |
344 | "New sim creation failed (Authentication Required): " + | 345 | "New sim creation failed (Authentication Required): " + |
345 | TheSim.regionName); | 346 | TheSim.regionName); |
346 | break; | 347 | break; |
@@ -348,9 +349,9 @@ namespace OpenSim.Grid.GridServer | |||
348 | } | 349 | } |
349 | catch (Exception e) | 350 | catch (Exception e) |
350 | { | 351 | { |
351 | MainLog.Instance.Warn("storage", | 352 | m_log.Warn("[storage]: " + |
352 | "Unable to add region " + TheSim.UUID.ToString() + " via " + kvp.Key); | 353 | "Unable to add region " + TheSim.UUID.ToString() + " via " + kvp.Key); |
353 | MainLog.Instance.Warn("storage", e.ToString()); | 354 | m_log.Warn("[storage]: " + e.ToString()); |
354 | } | 355 | } |
355 | 356 | ||
356 | 357 | ||
@@ -458,14 +459,14 @@ namespace OpenSim.Grid.GridServer | |||
458 | } | 459 | } |
459 | else | 460 | else |
460 | { | 461 | { |
461 | MainLog.Instance.Warn("grid", "Authentication failed when trying to add new region " + TheSim.regionName + " at location " + TheSim.regionLocX + " " + TheSim.regionLocY + " currently occupied by " + OldSim.regionName); | 462 | m_log.Warn("[grid]: Authentication failed when trying to add new region " + TheSim.regionName + " at location " + TheSim.regionLocX + " " + TheSim.regionLocY + " currently occupied by " + OldSim.regionName); |
462 | responseData["error"] = "The key required to connect to your region did not match. Please check your send and recieve keys."; | 463 | responseData["error"] = "The key required to connect to your region did not match. Please check your send and recieve keys."; |
463 | return response; | 464 | return response; |
464 | } | 465 | } |
465 | } | 466 | } |
466 | else | 467 | else |
467 | { | 468 | { |
468 | MainLog.Instance.Warn("grid", "Failed to add new region " + TheSim.regionName + " at location " + TheSim.regionLocX + " " + TheSim.regionLocY + " currently occupied by " + OldSim.regionName); | 469 | m_log.Warn("[grid]: Failed to add new region " + TheSim.regionName + " at location " + TheSim.regionLocX + " " + TheSim.regionLocY + " currently occupied by " + OldSim.regionName); |
469 | responseData["error"] = "Another region already exists at that location. Try another"; | 470 | responseData["error"] = "Another region already exists at that location. Try another"; |
470 | return response; | 471 | return response; |
471 | } | 472 | } |
@@ -496,7 +497,7 @@ namespace OpenSim.Grid.GridServer | |||
496 | } | 497 | } |
497 | else | 498 | else |
498 | { | 499 | { |
499 | MainLog.Instance.Verbose("DATA", "found " + (string) simData.regionName + " regionHandle = " + | 500 | m_log.Info("[DATA]: found " + (string) simData.regionName + " regionHandle = " + |
500 | (string) requestData["region_handle"]); | 501 | (string) requestData["region_handle"]); |
501 | responseData["sim_ip"] = Util.GetHostFromDNS(simData.serverIP).ToString(); | 502 | responseData["sim_ip"] = Util.GetHostFromDNS(simData.serverIP).ToString(); |
502 | responseData["sim_port"] = simData.serverPort.ToString(); | 503 | responseData["sim_port"] = simData.serverPort.ToString(); |
@@ -535,8 +536,8 @@ namespace OpenSim.Grid.GridServer | |||
535 | { | 536 | { |
536 | ymax = (Int32) requestData["ymax"]; | 537 | ymax = (Int32) requestData["ymax"]; |
537 | } | 538 | } |
538 | //CFK: The second MainLog is more meaningful and either standard or fast generally occurs. | 539 | //CFK: The second log is more meaningful and either standard or fast generally occurs. |
539 | //CFK: MainLog.Instance.Verbose("MAP", "World map request for range (" + xmin + "," + ymin + ")..(" + xmax + "," + ymax + ")"); | 540 | //CFK: m_log.Info("[MAP]: World map request for range (" + xmin + "," + ymin + ")..(" + xmax + "," + ymax + ")"); |
540 | 541 | ||
541 | XmlRpcResponse response = new XmlRpcResponse(); | 542 | XmlRpcResponse response = new XmlRpcResponse(); |
542 | Hashtable responseData = new Hashtable(); | 543 | Hashtable responseData = new Hashtable(); |
@@ -575,7 +576,7 @@ namespace OpenSim.Grid.GridServer | |||
575 | 576 | ||
576 | simProfileList.Add(simProfileBlock); | 577 | simProfileList.Add(simProfileBlock); |
577 | } | 578 | } |
578 | MainLog.Instance.Verbose("MAP", "Fast map " + simProfileList.Count.ToString() + | 579 | m_log.Info("[MAP]: Fast map " + simProfileList.Count.ToString() + |
579 | " regions @ (" + xmin + "," + ymin + ")..(" + xmax + "," + ymax + ")"); | 580 | " regions @ (" + xmin + "," + ymin + ")..(" + xmax + "," + ymax + ")"); |
580 | } | 581 | } |
581 | else | 582 | else |
@@ -610,7 +611,7 @@ namespace OpenSim.Grid.GridServer | |||
610 | } | 611 | } |
611 | } | 612 | } |
612 | } | 613 | } |
613 | MainLog.Instance.Verbose("MAP", "Std map " + simProfileList.Count.ToString() + | 614 | m_log.Info("[MAP]: Std map " + simProfileList.Count.ToString() + |
614 | " regions @ (" + xmin + "," + ymin + ")..(" + xmax + "," + ymax + ")"); | 615 | " regions @ (" + xmin + "," + ymin + ")..(" + xmax + "," + ymax + ")"); |
615 | } | 616 | } |
616 | 617 | ||
@@ -776,7 +777,7 @@ namespace OpenSim.Grid.GridServer | |||
776 | 777 | ||
777 | try | 778 | try |
778 | { | 779 | { |
779 | MainLog.Instance.Verbose("DATA", | 780 | m_log.Info("[DATA]: " + |
780 | "Updating / adding via " + _plugins.Count + " storage provider(s) registered."); | 781 | "Updating / adding via " + _plugins.Count + " storage provider(s) registered."); |
781 | foreach (KeyValuePair<string, IGridData> kvp in _plugins) | 782 | foreach (KeyValuePair<string, IGridData> kvp in _plugins) |
782 | { | 783 | { |
@@ -789,13 +790,13 @@ namespace OpenSim.Grid.GridServer | |||
789 | (reserveData == null && authkeynode.InnerText != TheSim.regionRecvKey)) | 790 | (reserveData == null && authkeynode.InnerText != TheSim.regionRecvKey)) |
790 | { | 791 | { |
791 | kvp.Value.AddProfile(TheSim); | 792 | kvp.Value.AddProfile(TheSim); |
792 | MainLog.Instance.Verbose("grid", "New sim added to grid (" + TheSim.regionName + ")"); | 793 | m_log.Info("[grid]: New sim added to grid (" + TheSim.regionName + ")"); |
793 | logToDB(TheSim.UUID.ToString(), "RestSetSimMethod", String.Empty, 5, | 794 | logToDB(TheSim.UUID.ToString(), "RestSetSimMethod", String.Empty, 5, |
794 | "Region successfully updated and connected to grid."); | 795 | "Region successfully updated and connected to grid."); |
795 | } | 796 | } |
796 | else | 797 | else |
797 | { | 798 | { |
798 | MainLog.Instance.Warn("grid", | 799 | m_log.Warn("[grid]: " + |
799 | "Unable to update region (RestSetSimMethod): Incorrect reservation auth key."); | 800 | "Unable to update region (RestSetSimMethod): Incorrect reservation auth key."); |
800 | // Wanted: " + reserveData.gridRecvKey + ", Got: " + TheSim.regionRecvKey + "."); | 801 | // Wanted: " + reserveData.gridRecvKey + ", Got: " + TheSim.regionRecvKey + "."); |
801 | return "Unable to update region (RestSetSimMethod): Incorrect auth key."; | 802 | return "Unable to update region (RestSetSimMethod): Incorrect auth key."; |
@@ -803,7 +804,7 @@ namespace OpenSim.Grid.GridServer | |||
803 | } | 804 | } |
804 | catch (Exception e) | 805 | catch (Exception e) |
805 | { | 806 | { |
806 | MainLog.Instance.Warn("GRID", "getRegionPlugin Handle " + kvp.Key + " unable to add new sim: " + | 807 | m_log.Warn("[GRID]: getRegionPlugin Handle " + kvp.Key + " unable to add new sim: " + |
807 | e.ToString()); | 808 | e.ToString()); |
808 | } | 809 | } |
809 | } | 810 | } |
diff --git a/OpenSim/Grid/GridServer/Main.cs b/OpenSim/Grid/GridServer/Main.cs index 8a522c2..ff4a888 100644 --- a/OpenSim/Grid/GridServer/Main.cs +++ b/OpenSim/Grid/GridServer/Main.cs | |||
@@ -39,6 +39,8 @@ namespace OpenSim.Grid.GridServer | |||
39 | /// </summary> | 39 | /// </summary> |
40 | public class OpenGrid_Main : BaseOpenSimServer, conscmd_callback | 40 | public class OpenGrid_Main : BaseOpenSimServer, conscmd_callback |
41 | { | 41 | { |
42 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
43 | |||
42 | public GridConfig Cfg; | 44 | public GridConfig Cfg; |
43 | 45 | ||
44 | public static OpenGrid_Main thegrid; | 46 | public static OpenGrid_Main thegrid; |
@@ -54,11 +56,13 @@ namespace OpenSim.Grid.GridServer | |||
54 | [STAThread] | 56 | [STAThread] |
55 | public static void Main(string[] args) | 57 | public static void Main(string[] args) |
56 | { | 58 | { |
59 | log4net.Config.XmlConfigurator.Configure(); | ||
60 | |||
57 | if (args.Length > 0) | 61 | if (args.Length > 0) |
58 | { | 62 | { |
59 | if (args[0] == "-setuponly") setuponly = true; | 63 | if (args[0] == "-setuponly") setuponly = true; |
60 | } | 64 | } |
61 | Console.WriteLine("Starting...\n"); | 65 | m_log.Info("Starting...\n"); |
62 | 66 | ||
63 | thegrid = new OpenGrid_Main(); | 67 | thegrid = new OpenGrid_Main(); |
64 | thegrid.Startup(); | 68 | thegrid.Startup(); |
@@ -68,23 +72,18 @@ namespace OpenSim.Grid.GridServer | |||
68 | 72 | ||
69 | private void Work() | 73 | private void Work() |
70 | { | 74 | { |
71 | m_log.Notice("Enter help for a list of commands\n"); | 75 | m_console.Notice("Enter help for a list of commands\n"); |
72 | 76 | ||
73 | while (true) | 77 | while (true) |
74 | { | 78 | { |
75 | m_log.MainLogPrompt(); | 79 | m_console.Prompt(); |
76 | } | 80 | } |
77 | } | 81 | } |
78 | 82 | ||
79 | private OpenGrid_Main() | 83 | private OpenGrid_Main() |
80 | { | 84 | { |
81 | if (!Directory.Exists(Util.logDir())) | 85 | m_console = new ConsoleBase("OpenGrid", this); |
82 | { | 86 | MainConsole.Instance = m_console; |
83 | Directory.CreateDirectory(Util.logDir()); | ||
84 | } | ||
85 | m_log = | ||
86 | new LogBase((Path.Combine(Util.logDir(), "opengrid-gridserver-console.log")), "OpenGrid", this, true); | ||
87 | MainLog.Instance = m_log; | ||
88 | } | 87 | } |
89 | 88 | ||
90 | public void managercallback(string cmd) | 89 | public void managercallback(string cmd) |
@@ -97,19 +96,18 @@ namespace OpenSim.Grid.GridServer | |||
97 | } | 96 | } |
98 | } | 97 | } |
99 | 98 | ||
100 | |||
101 | public void Startup() | 99 | public void Startup() |
102 | { | 100 | { |
103 | Cfg = new GridConfig("GRID SERVER", (Path.Combine(Util.configDir(), "GridServer_Config.xml"))); | 101 | Cfg = new GridConfig("GRID SERVER", (Path.Combine(Util.configDir(), "GridServer_Config.xml"))); |
104 | //Yeah srsly, that's it. | 102 | //Yeah srsly, that's it. |
105 | if (setuponly) Environment.Exit(0); | 103 | if (setuponly) Environment.Exit(0); |
106 | 104 | ||
107 | m_log.Verbose("GRID", "Connecting to Storage Server"); | 105 | m_log.Info("[GRID]: Connecting to Storage Server"); |
108 | m_gridManager = new GridManager(); | 106 | m_gridManager = new GridManager(); |
109 | m_gridManager.AddPlugin(Cfg.DatabaseProvider); // Made of win | 107 | m_gridManager.AddPlugin(Cfg.DatabaseProvider); // Made of win |
110 | m_gridManager.config = Cfg; | 108 | m_gridManager.config = Cfg; |
111 | 109 | ||
112 | m_log.Verbose("GRID", "Starting HTTP process"); | 110 | m_log.Info("[GRID]: Starting HTTP process"); |
113 | BaseHttpServer httpServer = new BaseHttpServer(Cfg.HttpPort); | 111 | BaseHttpServer httpServer = new BaseHttpServer(Cfg.HttpPort); |
114 | //GridManagementAgent GridManagerAgent = new GridManagementAgent(httpServer, "gridserver", Cfg.SimSendKey, Cfg.SimRecvKey, managercallback); | 112 | //GridManagementAgent GridManagerAgent = new GridManagementAgent(httpServer, "gridserver", Cfg.SimSendKey, Cfg.SimRecvKey, managercallback); |
115 | 113 | ||
@@ -135,7 +133,7 @@ namespace OpenSim.Grid.GridServer | |||
135 | 133 | ||
136 | httpServer.Start(); | 134 | httpServer.Start(); |
137 | 135 | ||
138 | m_log.Verbose("GRID", "Starting sim status checker"); | 136 | m_log.Info("[GRID]: Starting sim status checker"); |
139 | 137 | ||
140 | Timer simCheckTimer = new Timer(3600000*3); // 3 Hours between updates. | 138 | Timer simCheckTimer = new Timer(3600000*3); // 3 Hours between updates. |
141 | simCheckTimer.Elapsed += new ElapsedEventHandler(CheckSims); | 139 | simCheckTimer.Elapsed += new ElapsedEventHandler(CheckSims); |
@@ -186,11 +184,11 @@ namespace OpenSim.Grid.GridServer | |||
186 | switch (cmd) | 184 | switch (cmd) |
187 | { | 185 | { |
188 | case "help": | 186 | case "help": |
189 | m_log.Notice("shutdown - shutdown the grid (USE CAUTION!)"); | 187 | m_console.Notice("shutdown - shutdown the grid (USE CAUTION!)"); |
190 | break; | 188 | break; |
191 | 189 | ||
192 | case "shutdown": | 190 | case "shutdown": |
193 | m_log.Close(); | 191 | m_console.Close(); |
194 | Environment.Exit(0); | 192 | Environment.Exit(0); |
195 | break; | 193 | break; |
196 | } | 194 | } |
diff --git a/OpenSim/Grid/InventoryServer/GridInventoryService.cs b/OpenSim/Grid/InventoryServer/GridInventoryService.cs index d36a915..a719452 100644 --- a/OpenSim/Grid/InventoryServer/GridInventoryService.cs +++ b/OpenSim/Grid/InventoryServer/GridInventoryService.cs | |||
@@ -37,6 +37,8 @@ namespace OpenSim.Grid.InventoryServer | |||
37 | { | 37 | { |
38 | public class GridInventoryService : InventoryServiceBase | 38 | public class GridInventoryService : InventoryServiceBase |
39 | { | 39 | { |
40 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | |||
40 | public override void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack, | 42 | public override void RequestInventoryForUser(LLUUID userID, InventoryFolderInfo folderCallBack, |
41 | InventoryItemInfo itemCallBack) | 43 | InventoryItemInfo itemCallBack) |
42 | { | 44 | { |
@@ -108,7 +110,7 @@ namespace OpenSim.Grid.InventoryServer | |||
108 | LLUUID userID = new LLUUID(rawUserID); | 110 | LLUUID userID = new LLUUID(rawUserID); |
109 | 111 | ||
110 | // We get enough verbose messages later on for diagnostics | 112 | // We get enough verbose messages later on for diagnostics |
111 | //MainLog.Instance.Verbose("INVENTORY", "Request for inventory for " + userID.ToString()); | 113 | //m_log.Info("[INVENTORY]: Request for inventory for " + userID.ToString()); |
112 | 114 | ||
113 | InventoryCollection invCollection = new InventoryCollection(); | 115 | InventoryCollection invCollection = new InventoryCollection(); |
114 | List<InventoryFolderBase> folders; | 116 | List<InventoryFolderBase> folders; |
@@ -126,8 +128,8 @@ namespace OpenSim.Grid.InventoryServer | |||
126 | { | 128 | { |
127 | LLUUID userID = new LLUUID(rawUserID); | 129 | LLUUID userID = new LLUUID(rawUserID); |
128 | 130 | ||
129 | MainLog.Instance.Verbose( | 131 | m_log.Info( |
130 | "INVENTORY", "Creating new set of inventory folders for " + userID.ToString()); | 132 | "[INVENTORY]: Creating new set of inventory folders for " + userID.ToString()); |
131 | 133 | ||
132 | CreateNewUserInventory(userID); | 134 | CreateNewUserInventory(userID); |
133 | return true; | 135 | return true; |
@@ -152,8 +154,8 @@ namespace OpenSim.Grid.InventoryServer | |||
152 | public bool AddInventoryFolder(InventoryFolderBase folder) | 154 | public bool AddInventoryFolder(InventoryFolderBase folder) |
153 | { | 155 | { |
154 | // Right now, this actions act more like an update/insert combination than a simple create. | 156 | // Right now, this actions act more like an update/insert combination than a simple create. |
155 | MainLog.Instance.Verbose( | 157 | m_log.Info( |
156 | "INVENTORY", | 158 | "[INVENTORY]: " + |
157 | "Updating in " + folder.parentID.ToString() | 159 | "Updating in " + folder.parentID.ToString() |
158 | + ", folder " + folder.name); | 160 | + ", folder " + folder.name); |
159 | 161 | ||
@@ -163,8 +165,8 @@ namespace OpenSim.Grid.InventoryServer | |||
163 | 165 | ||
164 | public bool MoveInventoryFolder(InventoryFolderBase folder) | 166 | public bool MoveInventoryFolder(InventoryFolderBase folder) |
165 | { | 167 | { |
166 | MainLog.Instance.Verbose( | 168 | m_log.Info( |
167 | "INVENTORY", | 169 | "[INVENTORY]: " + |
168 | "Moving folder " + folder.folderID | 170 | "Moving folder " + folder.folderID |
169 | + " to " + folder.parentID.ToString()); | 171 | + " to " + folder.parentID.ToString()); |
170 | 172 | ||
@@ -175,8 +177,8 @@ namespace OpenSim.Grid.InventoryServer | |||
175 | public bool AddInventoryItem(InventoryItemBase item) | 177 | public bool AddInventoryItem(InventoryItemBase item) |
176 | { | 178 | { |
177 | // Right now, this actions act more like an update/insert combination than a simple create. | 179 | // Right now, this actions act more like an update/insert combination than a simple create. |
178 | MainLog.Instance.Verbose( | 180 | m_log.Info( |
179 | "INVENTORY", | 181 | "[INVENTORY]: " + |
180 | "Updating in " + item.parentFolderID.ToString() | 182 | "Updating in " + item.parentFolderID.ToString() |
181 | + ", item " + item.inventoryName); | 183 | + ", item " + item.inventoryName); |
182 | 184 | ||
@@ -187,8 +189,8 @@ namespace OpenSim.Grid.InventoryServer | |||
187 | public override void DeleteInventoryItem(LLUUID userID, InventoryItemBase item) | 189 | public override void DeleteInventoryItem(LLUUID userID, InventoryItemBase item) |
188 | { | 190 | { |
189 | // extra spaces to align with other inventory messages | 191 | // extra spaces to align with other inventory messages |
190 | MainLog.Instance.Verbose( | 192 | m_log.Info( |
191 | "INVENTORY", | 193 | "[INVENTORY]: " + |
192 | "Deleting in " + item.parentFolderID.ToString() | 194 | "Deleting in " + item.parentFolderID.ToString() |
193 | + ", item " + item.inventoryName); | 195 | + ", item " + item.inventoryName); |
194 | 196 | ||
diff --git a/OpenSim/Grid/InventoryServer/InventoryManager.cs b/OpenSim/Grid/InventoryServer/InventoryManager.cs index 6ca5064..35b66b2 100644 --- a/OpenSim/Grid/InventoryServer/InventoryManager.cs +++ b/OpenSim/Grid/InventoryServer/InventoryManager.cs | |||
@@ -41,6 +41,8 @@ namespace OpenSim.Grid.InventoryServer | |||
41 | { | 41 | { |
42 | public class InventoryManager | 42 | public class InventoryManager |
43 | { | 43 | { |
44 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
45 | |||
44 | private IInventoryData _databasePlugin; | 46 | private IInventoryData _databasePlugin; |
45 | 47 | ||
46 | /// <summary> | 48 | /// <summary> |
@@ -49,10 +51,10 @@ namespace OpenSim.Grid.InventoryServer | |||
49 | /// <param name="FileName">The filename to the inventory server plugin DLL</param> | 51 | /// <param name="FileName">The filename to the inventory server plugin DLL</param> |
50 | public void AddDatabasePlugin(string FileName) | 52 | public void AddDatabasePlugin(string FileName) |
51 | { | 53 | { |
52 | MainLog.Instance.Verbose(OpenInventory_Main.LogName, "Invenstorage: Attempting to load " + FileName); | 54 | m_log.Info("[" + OpenInventory_Main.LogName + "]: Invenstorage: Attempting to load " + FileName); |
53 | Assembly pluginAssembly = Assembly.LoadFrom(FileName); | 55 | Assembly pluginAssembly = Assembly.LoadFrom(FileName); |
54 | 56 | ||
55 | MainLog.Instance.Verbose(OpenInventory_Main.LogName, | 57 | m_log.Info("[" + OpenInventory_Main.LogName + "]: " + |
56 | "Invenstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces."); | 58 | "Invenstorage: Found " + pluginAssembly.GetTypes().Length + " interfaces."); |
57 | foreach (Type pluginType in pluginAssembly.GetTypes()) | 59 | foreach (Type pluginType in pluginAssembly.GetTypes()) |
58 | { | 60 | { |
@@ -66,7 +68,7 @@ namespace OpenSim.Grid.InventoryServer | |||
66 | (IInventoryData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | 68 | (IInventoryData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); |
67 | plug.Initialise(); | 69 | plug.Initialise(); |
68 | _databasePlugin = plug; | 70 | _databasePlugin = plug; |
69 | MainLog.Instance.Verbose(OpenInventory_Main.LogName, | 71 | m_log.Info("[" + OpenInventory_Main.LogName + "]: " + |
70 | "Invenstorage: Added IInventoryData Interface"); | 72 | "Invenstorage: Added IInventoryData Interface"); |
71 | break; | 73 | break; |
72 | } | 74 | } |
@@ -156,7 +158,7 @@ namespace OpenSim.Grid.InventoryServer | |||
156 | saveInventoryToStream(_inventory, fs); | 158 | saveInventoryToStream(_inventory, fs); |
157 | fs.Flush(); | 159 | fs.Flush(); |
158 | fs.Close(); | 160 | fs.Close(); |
159 | MainLog.Instance.Debug(OpenInventory_Main.LogName, "Modified"); | 161 | m_log.Debug("[" + OpenInventory_Main.LogName + "]: Modified"); |
160 | } | 162 | } |
161 | } | 163 | } |
162 | 164 | ||
@@ -166,14 +168,14 @@ namespace OpenSim.Grid.InventoryServer | |||
166 | 168 | ||
167 | private byte[] GetUserInventory(LLUUID userID) | 169 | private byte[] GetUserInventory(LLUUID userID) |
168 | { | 170 | { |
169 | MainLog.Instance.Notice(OpenInventory_Main.LogName, "Getting Inventory for user {0}", userID.ToString()); | 171 | m_log.Info(String.Format("[" + OpenInventory_Main.LogName + "]: Getting Inventory for user {0}", userID.ToString())); |
170 | byte[] result = new byte[] {}; | 172 | byte[] result = new byte[] {}; |
171 | 173 | ||
172 | InventoryFolderBase fb = _manager._databasePlugin.getUserRootFolder(userID); | 174 | InventoryFolderBase fb = _manager._databasePlugin.getUserRootFolder(userID); |
173 | if (fb == null) | 175 | if (fb == null) |
174 | { | 176 | { |
175 | MainLog.Instance.Notice(OpenInventory_Main.LogName, "Inventory not found for user {0}, creating new", | 177 | m_log.Info(String.Format("[" + OpenInventory_Main.LogName + "]: Inventory not found for user {0}, creating new", |
176 | userID.ToString()); | 178 | userID.ToString())); |
177 | CreateDefaultInventory(userID); | 179 | CreateDefaultInventory(userID); |
178 | } | 180 | } |
179 | 181 | ||
diff --git a/OpenSim/Grid/InventoryServer/Main.cs b/OpenSim/Grid/InventoryServer/Main.cs index b62c696..5037c7d 100644 --- a/OpenSim/Grid/InventoryServer/Main.cs +++ b/OpenSim/Grid/InventoryServer/Main.cs | |||
@@ -38,6 +38,8 @@ namespace OpenSim.Grid.InventoryServer | |||
38 | { | 38 | { |
39 | public class OpenInventory_Main : BaseOpenSimServer, conscmd_callback | 39 | public class OpenInventory_Main : BaseOpenSimServer, conscmd_callback |
40 | { | 40 | { |
41 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
41 | private InventoryManager m_inventoryManager; | 43 | private InventoryManager m_inventoryManager; |
42 | private InventoryConfig m_config; | 44 | private InventoryConfig m_config; |
43 | private GridInventoryService m_inventoryService; | 45 | private GridInventoryService m_inventoryService; |
@@ -47,6 +49,8 @@ namespace OpenSim.Grid.InventoryServer | |||
47 | [STAThread] | 49 | [STAThread] |
48 | public static void Main(string[] args) | 50 | public static void Main(string[] args) |
49 | { | 51 | { |
52 | log4net.Config.XmlConfigurator.Configure(); | ||
53 | |||
50 | OpenInventory_Main theServer = new OpenInventory_Main(); | 54 | OpenInventory_Main theServer = new OpenInventory_Main(); |
51 | theServer.Startup(); | 55 | theServer.Startup(); |
52 | 56 | ||
@@ -55,20 +59,20 @@ namespace OpenSim.Grid.InventoryServer | |||
55 | 59 | ||
56 | public OpenInventory_Main() | 60 | public OpenInventory_Main() |
57 | { | 61 | { |
58 | m_log = new LogBase("opengrid-inventory-console.log", LogName, this, true); | 62 | m_console = new ConsoleBase(LogName, this); |
59 | MainLog.Instance = m_log; | 63 | MainConsole.Instance = m_console; |
60 | } | 64 | } |
61 | 65 | ||
62 | public void Startup() | 66 | public void Startup() |
63 | { | 67 | { |
64 | MainLog.Instance.Notice("Initialising inventory manager..."); | 68 | m_log.Info("Initialising inventory manager..."); |
65 | m_config = new InventoryConfig(LogName, (Path.Combine(Util.configDir(), "InventoryServer_Config.xml"))); | 69 | m_config = new InventoryConfig(LogName, (Path.Combine(Util.configDir(), "InventoryServer_Config.xml"))); |
66 | 70 | ||
67 | m_inventoryService = new GridInventoryService(); | 71 | m_inventoryService = new GridInventoryService(); |
68 | // m_inventoryManager = new InventoryManager(); | 72 | // m_inventoryManager = new InventoryManager(); |
69 | m_inventoryService.AddPlugin(m_config.DatabaseProvider); | 73 | m_inventoryService.AddPlugin(m_config.DatabaseProvider); |
70 | 74 | ||
71 | MainLog.Instance.Notice(LogName, "Starting HTTP server ..."); | 75 | m_log.Info("[" + LogName + "]: Starting HTTP server ..."); |
72 | BaseHttpServer httpServer = new BaseHttpServer(m_config.HttpPort); | 76 | BaseHttpServer httpServer = new BaseHttpServer(m_config.HttpPort); |
73 | httpServer.AddStreamHandler( | 77 | httpServer.AddStreamHandler( |
74 | new RestDeserialisehandler<Guid, InventoryCollection>("POST", "/GetInventory/", | 78 | new RestDeserialisehandler<Guid, InventoryCollection>("POST", "/GetInventory/", |
@@ -95,19 +99,19 @@ namespace OpenSim.Grid.InventoryServer | |||
95 | new RestDeserialisehandler<Guid, List<InventoryFolderBase>>("POST", "/RootFolders/", | 99 | new RestDeserialisehandler<Guid, List<InventoryFolderBase>>("POST", "/RootFolders/", |
96 | m_inventoryService.RequestFirstLevelFolders)); | 100 | m_inventoryService.RequestFirstLevelFolders)); |
97 | 101 | ||
98 | // httpServer.AddStreamHandler(new InventoryManager.GetInventory(m_inventoryManager)); | 102 | // httpServer.AddStreamHandler(new InventoryManager.GetInventory(m_inventoryManager)); |
99 | 103 | ||
100 | httpServer.Start(); | 104 | httpServer.Start(); |
101 | MainLog.Instance.Notice(LogName, "Started HTTP server"); | 105 | m_log.Info("[" + LogName + "]: Started HTTP server"); |
102 | } | 106 | } |
103 | 107 | ||
104 | private void Work() | 108 | private void Work() |
105 | { | 109 | { |
106 | m_log.Notice("Enter help for a list of commands\n"); | 110 | m_console.Notice("Enter help for a list of commands\n"); |
107 | 111 | ||
108 | while (true) | 112 | while (true) |
109 | { | 113 | { |
110 | m_log.MainLogPrompt(); | 114 | m_console.Prompt(); |
111 | } | 115 | } |
112 | } | 116 | } |
113 | 117 | ||
@@ -122,7 +126,7 @@ namespace OpenSim.Grid.InventoryServer | |||
122 | m_inventoryService.CreateUsersInventory(LLUUID.Random().UUID); | 126 | m_inventoryService.CreateUsersInventory(LLUUID.Random().UUID); |
123 | break; | 127 | break; |
124 | case "shutdown": | 128 | case "shutdown": |
125 | m_log.Close(); | 129 | m_console.Close(); |
126 | Environment.Exit(0); | 130 | Environment.Exit(0); |
127 | break; | 131 | break; |
128 | } | 132 | } |
diff --git a/OpenSim/Grid/MessagingServer/Main.cs b/OpenSim/Grid/MessagingServer/Main.cs index 3d5ceb4..c16b0f8 100644 --- a/OpenSim/Grid/MessagingServer/Main.cs +++ b/OpenSim/Grid/MessagingServer/Main.cs | |||
@@ -41,6 +41,8 @@ namespace OpenSim.Grid.MessagingServer | |||
41 | /// </summary> | 41 | /// </summary> |
42 | public class OpenMessage_Main : BaseOpenSimServer, conscmd_callback | 42 | public class OpenMessage_Main : BaseOpenSimServer, conscmd_callback |
43 | { | 43 | { |
44 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
45 | |||
44 | private MessageServerConfig Cfg; | 46 | private MessageServerConfig Cfg; |
45 | 47 | ||
46 | //public UserManager m_userManager; | 48 | //public UserManager m_userManager; |
@@ -51,7 +53,9 @@ namespace OpenSim.Grid.MessagingServer | |||
51 | [STAThread] | 53 | [STAThread] |
52 | public static void Main(string[] args) | 54 | public static void Main(string[] args) |
53 | { | 55 | { |
54 | Console.WriteLine("Launching MessagingServer..."); | 56 | log4net.Config.XmlConfigurator.Configure(); |
57 | |||
58 | m_log.Info("Launching MessagingServer..."); | ||
55 | 59 | ||
56 | OpenMessage_Main messageserver = new OpenMessage_Main(); | 60 | OpenMessage_Main messageserver = new OpenMessage_Main(); |
57 | 61 | ||
@@ -61,22 +65,17 @@ namespace OpenSim.Grid.MessagingServer | |||
61 | 65 | ||
62 | private OpenMessage_Main() | 66 | private OpenMessage_Main() |
63 | { | 67 | { |
64 | if (!Directory.Exists(Util.logDir())) | 68 | m_console = new ConsoleBase("OpenMessage", this); |
65 | { | 69 | MainConsole.Instance = m_console; |
66 | Directory.CreateDirectory(Util.logDir()); | ||
67 | } | ||
68 | m_log = | ||
69 | new LogBase((Path.Combine(Util.logDir(), "opengrid-messagingserver-console.log")), "OpenMessage", this, true); | ||
70 | MainLog.Instance = m_log; | ||
71 | } | 70 | } |
72 | 71 | ||
73 | private void Work() | 72 | private void Work() |
74 | { | 73 | { |
75 | m_log.Notice("Enter help for a list of commands\n"); | 74 | m_console.Notice("Enter help for a list of commands\n"); |
76 | 75 | ||
77 | while (true) | 76 | while (true) |
78 | { | 77 | { |
79 | m_log.MainLogPrompt(); | 78 | m_console.Prompt(); |
80 | } | 79 | } |
81 | } | 80 | } |
82 | 81 | ||
@@ -84,9 +83,7 @@ namespace OpenSim.Grid.MessagingServer | |||
84 | { | 83 | { |
85 | Cfg = new MessageServerConfig("MESSAGING SERVER", (Path.Combine(Util.configDir(), "MessagingServer_Config.xml"))); | 84 | Cfg = new MessageServerConfig("MESSAGING SERVER", (Path.Combine(Util.configDir(), "MessagingServer_Config.xml"))); |
86 | 85 | ||
87 | 86 | m_log.Info("[REGION]: Starting HTTP process"); | |
88 | |||
89 | MainLog.Instance.Verbose("REGION", "Starting HTTP process"); | ||
90 | BaseHttpServer httpServer = new BaseHttpServer(Cfg.HttpPort); | 87 | BaseHttpServer httpServer = new BaseHttpServer(Cfg.HttpPort); |
91 | 88 | ||
92 | //httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod); | 89 | //httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod); |
@@ -104,10 +101,9 @@ namespace OpenSim.Grid.MessagingServer | |||
104 | //new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod)); | 101 | //new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod)); |
105 | 102 | ||
106 | httpServer.Start(); | 103 | httpServer.Start(); |
107 | m_log.Status("SERVER", "Messageserver 0.4 - Startup complete"); | 104 | m_log.Info("[SERVER]: Messageserver 0.4 - Startup complete"); |
108 | } | 105 | } |
109 | 106 | ||
110 | |||
111 | public void do_create(string what) | 107 | public void do_create(string what) |
112 | { | 108 | { |
113 | switch (what) | 109 | switch (what) |
@@ -120,7 +116,7 @@ namespace OpenSim.Grid.MessagingServer | |||
120 | //m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); | 116 | //m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); |
121 | } catch (Exception ex) | 117 | } catch (Exception ex) |
122 | { | 118 | { |
123 | m_log.Error("SERVER", "Error creating user: {0}", ex.ToString()); | 119 | m_console.Error("[SERVER]: Error creating user: {0}", ex.ToString()); |
124 | } | 120 | } |
125 | 121 | ||
126 | try | 122 | try |
@@ -130,9 +126,9 @@ namespace OpenSim.Grid.MessagingServer | |||
130 | } | 126 | } |
131 | catch (Exception ex) | 127 | catch (Exception ex) |
132 | { | 128 | { |
133 | m_log.Error("SERVER", "Error creating inventory for user: {0}", ex.ToString()); | 129 | m_console.Error("[SERVER]: Error creating inventory for user: {0}", ex.ToString()); |
134 | } | 130 | } |
135 | // m_lastCreatedUser = userID; | 131 | // m_lastCreatedUser = userID; |
136 | break; | 132 | break; |
137 | } | 133 | } |
138 | } | 134 | } |
@@ -144,11 +140,11 @@ namespace OpenSim.Grid.MessagingServer | |||
144 | switch (cmd) | 140 | switch (cmd) |
145 | { | 141 | { |
146 | case "help": | 142 | case "help": |
147 | m_log.Notice("shutdown - shutdown the message server (USE CAUTION!)"); | 143 | m_console.Notice("shutdown - shutdown the message server (USE CAUTION!)"); |
148 | break; | 144 | break; |
149 | 145 | ||
150 | case "shutdown": | 146 | case "shutdown": |
151 | m_log.Close(); | 147 | m_console.Close(); |
152 | Environment.Exit(0); | 148 | Environment.Exit(0); |
153 | break; | 149 | break; |
154 | } | 150 | } |
diff --git a/OpenSim/Grid/MessagingServer/MessageService.cs b/OpenSim/Grid/MessagingServer/MessageService.cs index 056bfcb..c2669b0 100644 --- a/OpenSim/Grid/MessagingServer/MessageService.cs +++ b/OpenSim/Grid/MessagingServer/MessageService.cs | |||
@@ -43,7 +43,8 @@ namespace OpenSim.Grid.MessagingServer | |||
43 | { | 43 | { |
44 | public class MessageService | 44 | public class MessageService |
45 | { | 45 | { |
46 | private LogBase m_log; | 46 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
47 | |||
47 | private MessageServerConfig m_cfg; | 48 | private MessageServerConfig m_cfg; |
48 | 49 | ||
49 | //A hashtable of all current presences this server knows about | 50 | //A hashtable of all current presences this server knows about |
@@ -58,13 +59,10 @@ namespace OpenSim.Grid.MessagingServer | |||
58 | // Hashtable containing work units that need to be processed | 59 | // Hashtable containing work units that need to be processed |
59 | private Hashtable m_unProcessedWorkUnits = new Hashtable(); | 60 | private Hashtable m_unProcessedWorkUnits = new Hashtable(); |
60 | 61 | ||
61 | 62 | public MessageService(MessageServerConfig cfg) | |
62 | public MessageService(LogBase log, MessageServerConfig cfg) | ||
63 | { | 63 | { |
64 | m_log = log; | ||
65 | m_cfg = cfg; | 64 | m_cfg = cfg; |
66 | } | 65 | } |
67 | |||
68 | 66 | ||
69 | #region RegionComms Methods | 67 | #region RegionComms Methods |
70 | 68 | ||
@@ -84,7 +82,7 @@ namespace OpenSim.Grid.MessagingServer | |||
84 | ArrayList SendParams = new ArrayList(); | 82 | ArrayList SendParams = new ArrayList(); |
85 | SendParams.Add(PresenceParams); | 83 | SendParams.Add(PresenceParams); |
86 | 84 | ||
87 | MainLog.Instance.Verbose("PRESENCE", "Informing " + whichRegion.regionName + " at " + whichRegion.httpServerURI); | 85 | m_log.Info("[PRESENCE]: Informing " + whichRegion.regionName + " at " + whichRegion.httpServerURI); |
88 | // Send | 86 | // Send |
89 | XmlRpcRequest RegionReq = new XmlRpcRequest("presence_update", SendParams); | 87 | XmlRpcRequest RegionReq = new XmlRpcRequest("presence_update", SendParams); |
90 | XmlRpcResponse RegionResp = RegionReq.Send(whichRegion.httpServerURI, 6000); | 88 | XmlRpcResponse RegionResp = RegionReq.Send(whichRegion.httpServerURI, 6000); |
@@ -292,7 +290,7 @@ namespace OpenSim.Grid.MessagingServer | |||
292 | } | 290 | } |
293 | catch (WebException e) | 291 | catch (WebException e) |
294 | { | 292 | { |
295 | MainLog.Instance.Warn("Error when trying to fetch Avatar's friends list: " + | 293 | m_log.Warn("Error when trying to fetch Avatar's friends list: " + |
296 | e.Message); | 294 | e.Message); |
297 | // Return Empty list (no friends) | 295 | // Return Empty list (no friends) |
298 | } | 296 | } |
@@ -439,7 +437,7 @@ namespace OpenSim.Grid.MessagingServer | |||
439 | 437 | ||
440 | if (responseData.ContainsKey("error")) | 438 | if (responseData.ContainsKey("error")) |
441 | { | 439 | { |
442 | m_log.Error("GRID","error received from grid server" + responseData["error"]); | 440 | m_log.Error("[GRID]: error received from grid server" + responseData["error"]); |
443 | return null; | 441 | return null; |
444 | } | 442 | } |
445 | 443 | ||
@@ -465,7 +463,7 @@ namespace OpenSim.Grid.MessagingServer | |||
465 | } | 463 | } |
466 | catch (WebException) | 464 | catch (WebException) |
467 | { | 465 | { |
468 | MainLog.Instance.Error("GRID", | 466 | m_log.Error("[GRID]: " + |
469 | "Region lookup failed for: " + regionHandle.ToString() + | 467 | "Region lookup failed for: " + regionHandle.ToString() + |
470 | " - Is the GridServer down?"); | 468 | " - Is the GridServer down?"); |
471 | return null; | 469 | return null; |
diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/Common.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Common.cs index 98a2cc5..bcfeefc 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Common.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/Common.cs | |||
@@ -26,10 +26,13 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | /* Original code: Tedd Hansen */ | 28 | /* Original code: Tedd Hansen */ |
29 | |||
29 | namespace OpenSim.Grid.ScriptEngine.DotNetEngine | 30 | namespace OpenSim.Grid.ScriptEngine.DotNetEngine |
30 | { | 31 | { |
31 | public static class Common | 32 | public static class Common |
32 | { | 33 | { |
34 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
35 | |||
33 | public static bool debug = true; | 36 | public static bool debug = true; |
34 | public static ScriptEngine mySE; | 37 | public static ScriptEngine mySE; |
35 | 38 | ||
@@ -41,14 +44,14 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine | |||
41 | public static void SendToDebug(string Message) | 44 | public static void SendToDebug(string Message) |
42 | { | 45 | { |
43 | //if (Debug == true) | 46 | //if (Debug == true) |
44 | mySE.Log.Verbose("ScriptEngine", "Debug: " + Message); | 47 | mySE.m_log.Info("[ScriptEngine]: Debug: " + Message); |
45 | //SendToDebugEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message); | 48 | //SendToDebugEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message); |
46 | } | 49 | } |
47 | 50 | ||
48 | public static void SendToLog(string Message) | 51 | public static void SendToLog(string Message) |
49 | { | 52 | { |
50 | //if (Debug == true) | 53 | //if (Debug == true) |
51 | mySE.Log.Verbose("ScriptEngine", "LOG: " + Message); | 54 | mySE.m_log.Info("[ScriptEngine]: LOG: " + Message); |
52 | //SendToLogEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message); | 55 | //SendToLogEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message); |
53 | } | 56 | } |
54 | } | 57 | } |
diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs index 1f5e6da..e0a5461 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/LSL/LSL_BaseClass.cs | |||
@@ -41,6 +41,8 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSL | |||
41 | //[Serializable] | 41 | //[Serializable] |
42 | public class LSL_BaseClass : MarshalByRefObject, LSL_BuiltIn_Commands_Interface, IScript | 42 | public class LSL_BaseClass : MarshalByRefObject, LSL_BuiltIn_Commands_Interface, IScript |
43 | { | 43 | { |
44 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
45 | |||
44 | // Object never expires | 46 | // Object never expires |
45 | public override Object InitializeLifetimeService() | 47 | public override Object InitializeLifetimeService() |
46 | { | 48 | { |
@@ -87,7 +89,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler.LSL | |||
87 | { | 89 | { |
88 | m_LSL_Functions = LSL_Functions; | 90 | m_LSL_Functions = LSL_Functions; |
89 | 91 | ||
90 | //MainLog.Instance.Notice("ScriptEngine", "LSL_BaseClass.Start() called."); | 92 | //m_log.Info("[ScriptEngine]: LSL_BaseClass.Start() called."); |
91 | 93 | ||
92 | // Get this AppDomain's settings and display some of them. | 94 | // Get this AppDomain's settings and display some of them. |
93 | AppDomainSetup ads = AppDomain.CurrentDomain.SetupInformation; | 95 | AppDomainSetup ads = AppDomain.CurrentDomain.SetupInformation; |
diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs index 8f58b55..1ffbd3a 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/Compiler/Server_API/LSL_BuiltIn_Commands.cs | |||
@@ -52,6 +52,8 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler | |||
52 | /// </summary> | 52 | /// </summary> |
53 | public class LSL_BuiltIn_Commands : MarshalByRefObject, LSL_BuiltIn_Commands_Interface | 53 | public class LSL_BuiltIn_Commands : MarshalByRefObject, LSL_BuiltIn_Commands_Interface |
54 | { | 54 | { |
55 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
56 | |||
55 | private ASCIIEncoding enc = new ASCIIEncoding(); | 57 | private ASCIIEncoding enc = new ASCIIEncoding(); |
56 | private ScriptEngine m_ScriptEngine; | 58 | private ScriptEngine m_ScriptEngine; |
57 | private SceneObjectPart m_host; | 59 | private SceneObjectPart m_host; |
@@ -68,7 +70,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine.Compiler | |||
68 | m_itemID = itemID; | 70 | m_itemID = itemID; |
69 | 71 | ||
70 | 72 | ||
71 | //MainLog.Instance.Notice("ScriptEngine", "LSL_BaseClass.Start() called. Hosted by [" + m_host.Name + ":" + m_host.UUID + "@" + m_host.AbsolutePosition + "]"); | 73 | //m_log.Info("[ScriptEngine]: LSL_BaseClass.Start() called. Hosted by [" + m_host.Name + ":" + m_host.UUID + "@" + m_host.AbsolutePosition + "]"); |
72 | } | 74 | } |
73 | 75 | ||
74 | 76 | ||
diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/EventManager.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/EventManager.cs index 3a1ae5a..3aa2216 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/EventManager.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/EventManager.cs | |||
@@ -38,17 +38,19 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine | |||
38 | [Serializable] | 38 | [Serializable] |
39 | internal class EventManager | 39 | internal class EventManager |
40 | { | 40 | { |
41 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
41 | private ScriptEngine myScriptEngine; | 43 | private ScriptEngine myScriptEngine; |
42 | //public IScriptHost TEMP_OBJECT_ID; | 44 | //public IScriptHost TEMP_OBJECT_ID; |
43 | public EventManager(ScriptEngine _ScriptEngine) | 45 | public EventManager(ScriptEngine _ScriptEngine) |
44 | { | 46 | { |
45 | myScriptEngine = _ScriptEngine; | 47 | myScriptEngine = _ScriptEngine; |
46 | // TODO: HOOK EVENTS UP TO SERVER! | 48 | // TODO: HOOK EVENTS UP TO SERVER! |
47 | //myScriptEngine.m_logger.Verbose("ScriptEngine", "EventManager Start"); | 49 | //myScriptEngine.m_log.Info("[ScriptEngine]: EventManager Start"); |
48 | // TODO: ADD SERVER HOOK TO LOAD A SCRIPT THROUGH myScriptEngine.ScriptManager | 50 | // TODO: ADD SERVER HOOK TO LOAD A SCRIPT THROUGH myScriptEngine.ScriptManager |
49 | 51 | ||
50 | // Hook up a test event to our test form | 52 | // Hook up a test event to our test form |
51 | myScriptEngine.Log.Verbose("ScriptEngine", "Hooking up to server events"); | 53 | myScriptEngine.m_log.Info("[ScriptEngine]: Hooking up to server events"); |
52 | myScriptEngine.World.EventManager.OnObjectGrab += touch_start; | 54 | myScriptEngine.World.EventManager.OnObjectGrab += touch_start; |
53 | myScriptEngine.World.EventManager.OnRezScript += OnRezScript; | 55 | myScriptEngine.World.EventManager.OnRezScript += OnRezScript; |
54 | myScriptEngine.World.EventManager.OnRemoveScript += OnRemoveScript; | 56 | myScriptEngine.World.EventManager.OnRemoveScript += OnRemoveScript; |
@@ -57,7 +59,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine | |||
57 | public void touch_start(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) | 59 | public void touch_start(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) |
58 | { | 60 | { |
59 | // Add to queue for all scripts in ObjectID object | 61 | // Add to queue for all scripts in ObjectID object |
60 | //myScriptEngine.m_logger.Verbose("ScriptEngine", "EventManager Event: touch_start"); | 62 | //myScriptEngine.m_log.Info("[ScriptEngine]: EventManager Event: touch_start"); |
61 | //Console.WriteLine("touch_start localID: " + localID); | 63 | //Console.WriteLine("touch_start localID: " + localID); |
62 | myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "touch_start", new object[] {(int) 1}); | 64 | myScriptEngine.m_EventQueueManager.AddToObjectQueue(localID, "touch_start", new object[] {(int) 1}); |
63 | } | 65 | } |
diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/EventQueueManager.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/EventQueueManager.cs index d9d26aa..2606862 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/EventQueueManager.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/EventQueueManager.cs | |||
@@ -44,6 +44,8 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine | |||
44 | [Serializable] | 44 | [Serializable] |
45 | internal class EventQueueManager | 45 | internal class EventQueueManager |
46 | { | 46 | { |
47 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
48 | |||
47 | /// <summary> | 49 | /// <summary> |
48 | /// List of threads processing event queue | 50 | /// List of threads processing event queue |
49 | /// </summary> | 51 | /// </summary> |
@@ -118,7 +120,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine | |||
118 | } | 120 | } |
119 | catch (Exception) | 121 | catch (Exception) |
120 | { | 122 | { |
121 | //myScriptEngine.Log.Verbose("ScriptEngine", "EventQueueManager Exception killing worker thread: " + e.ToString()); | 123 | //myScriptEngine.m_log.Info("[ScriptEngine]: EventQueueManager Exception killing worker thread: " + e.ToString()); |
122 | } | 124 | } |
123 | } | 125 | } |
124 | } | 126 | } |
@@ -132,7 +134,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine | |||
132 | /// </summary> | 134 | /// </summary> |
133 | private void EventQueueThreadLoop() | 135 | private void EventQueueThreadLoop() |
134 | { | 136 | { |
135 | //myScriptEngine.m_logger.Verbose("ScriptEngine", "EventQueueManager Worker thread spawned"); | 137 | //myScriptEngine.m_log.Info("[ScriptEngine]: EventQueueManager Worker thread spawned"); |
136 | try | 138 | try |
137 | { | 139 | { |
138 | QueueItemStruct BlankQIS = new QueueItemStruct(); | 140 | QueueItemStruct BlankQIS = new QueueItemStruct(); |
@@ -151,7 +153,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine | |||
151 | else | 153 | else |
152 | { | 154 | { |
153 | // Something in queue, process | 155 | // Something in queue, process |
154 | //myScriptEngine.m_logger.Verbose("ScriptEngine", "Processing event for localID: " + QIS.localID + ", itemID: " + QIS.itemID + ", FunctionName: " + QIS.FunctionName); | 156 | //myScriptEngine.m_log.Info("[ScriptEngine]: Processing event for localID: " + QIS.localID + ", itemID: " + QIS.itemID + ", FunctionName: " + QIS.FunctionName); |
155 | 157 | ||
156 | // OBJECT BASED LOCK - TWO THREADS WORKING ON SAME OBJECT IS NOT GOOD | 158 | // OBJECT BASED LOCK - TWO THREADS WORKING ON SAME OBJECT IS NOT GOOD |
157 | lock (queueLock) | 159 | lock (queueLock) |
@@ -237,7 +239,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine | |||
237 | } // try | 239 | } // try |
238 | catch (ThreadAbortException) | 240 | catch (ThreadAbortException) |
239 | { | 241 | { |
240 | //myScriptEngine.Log.Verbose("ScriptEngine", "EventQueueManager Worker thread killed: " + tae.Message); | 242 | //myScriptEngine.m_log.Info("[ScriptEngine]: EventQueueManager Worker thread killed: " + tae.Message); |
241 | } | 243 | } |
242 | } | 244 | } |
243 | 245 | ||
@@ -287,7 +289,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine | |||
287 | public void AddToObjectQueue(uint localID, string FunctionName, object[] param) | 289 | public void AddToObjectQueue(uint localID, string FunctionName, object[] param) |
288 | { | 290 | { |
289 | // Determine all scripts in Object and add to their queue | 291 | // Determine all scripts in Object and add to their queue |
290 | //myScriptEngine.m_logger.Verbose("ScriptEngine", "EventQueueManager Adding localID: " + localID + ", FunctionName: " + FunctionName); | 292 | //myScriptEngine.m_log.Info("[ScriptEngine]: EventQueueManager Adding localID: " + localID + ", FunctionName: " + FunctionName); |
291 | 293 | ||
292 | 294 | ||
293 | // Do we have any scripts in this object at all? If not, return | 295 | // Do we have any scripts in this object at all? If not, return |
diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/ScriptEngine.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/ScriptEngine.cs index cc6cde2..a45efe9 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/ScriptEngine.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/ScriptEngine.cs | |||
@@ -40,6 +40,8 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine | |||
40 | [Serializable] | 40 | [Serializable] |
41 | public class ScriptEngine : IRegionModule | 41 | public class ScriptEngine : IRegionModule |
42 | { | 42 | { |
43 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
44 | |||
43 | internal Scene World; | 45 | internal Scene World; |
44 | internal EventManager m_EventManager; // Handles and queues incoming events from OpenSim | 46 | internal EventManager m_EventManager; // Handles and queues incoming events from OpenSim |
45 | internal EventQueueManager m_EventQueueManager; // Executes events | 47 | internal EventQueueManager m_EventQueueManager; // Executes events |
@@ -47,7 +49,6 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine | |||
47 | internal AppDomainManager m_AppDomainManager; | 49 | internal AppDomainManager m_AppDomainManager; |
48 | internal LSLLongCmdHandler m_LSLLongCmdHandler; | 50 | internal LSLLongCmdHandler m_LSLLongCmdHandler; |
49 | 51 | ||
50 | private LogBase m_log; | ||
51 | 52 | ||
52 | public ScriptEngine() | 53 | public ScriptEngine() |
53 | { | 54 | { |
@@ -55,19 +56,13 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine | |||
55 | Common.mySE = this; | 56 | Common.mySE = this; |
56 | } | 57 | } |
57 | 58 | ||
58 | public LogBase Log | 59 | public void InitializeEngine(Scene Sceneworld) |
59 | { | ||
60 | get { return m_log; } | ||
61 | } | ||
62 | |||
63 | public void InitializeEngine(Scene Sceneworld, LogBase logger) | ||
64 | { | 60 | { |
65 | World = Sceneworld; | 61 | World = Sceneworld; |
66 | m_log = logger; | ||
67 | 62 | ||
68 | Log.Verbose("ScriptEngine", "DotNet & LSL ScriptEngine initializing"); | 63 | m_log.Info("[ScriptEngine]: DotNet & LSL ScriptEngine initializing"); |
69 | 64 | ||
70 | //m_logger.Status("ScriptEngine", "InitializeEngine"); | 65 | //m_log.Info("[ScriptEngine]: InitializeEngine"); |
71 | 66 | ||
72 | // Create all objects we'll be using | 67 | // Create all objects we'll be using |
73 | m_EventQueueManager = new EventQueueManager(this); | 68 | m_EventQueueManager = new EventQueueManager(this); |
@@ -90,7 +85,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine | |||
90 | //public void StartScript(string ScriptID, IScriptHost ObjectID) | 85 | //public void StartScript(string ScriptID, IScriptHost ObjectID) |
91 | //{ | 86 | //{ |
92 | // this.myEventManager.TEMP_OBJECT_ID = ObjectID; | 87 | // this.myEventManager.TEMP_OBJECT_ID = ObjectID; |
93 | // Log.Status("ScriptEngine", "DEBUG FUNCTION: StartScript: " + ScriptID); | 88 | // m_log.Info("[ScriptEngine]: DEBUG FUNCTION: StartScript: " + ScriptID); |
94 | // myScriptManager.StartScript(ScriptID, ObjectID); | 89 | // myScriptManager.StartScript(ScriptID, ObjectID); |
95 | //} | 90 | //} |
96 | 91 | ||
@@ -98,7 +93,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine | |||
98 | 93 | ||
99 | public void Initialise(Scene scene, IConfigSource config) | 94 | public void Initialise(Scene scene, IConfigSource config) |
100 | { | 95 | { |
101 | InitializeEngine(scene, MainLog.Instance); | 96 | InitializeEngine(scene); |
102 | } | 97 | } |
103 | 98 | ||
104 | public void PostInitialise() | 99 | public void PostInitialise() |
diff --git a/OpenSim/Grid/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Grid/ScriptEngine/DotNetEngine/ScriptManager.cs index f482834..2846399 100644 --- a/OpenSim/Grid/ScriptEngine/DotNetEngine/ScriptManager.cs +++ b/OpenSim/Grid/ScriptEngine/DotNetEngine/ScriptManager.cs | |||
@@ -48,6 +48,8 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine | |||
48 | [Serializable] | 48 | [Serializable] |
49 | public class ScriptManager | 49 | public class ScriptManager |
50 | { | 50 | { |
51 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
52 | |||
51 | #region Declares | 53 | #region Declares |
52 | 54 | ||
53 | private Thread scriptLoadUnloadThread; | 55 | private Thread scriptLoadUnloadThread; |
@@ -312,7 +314,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine | |||
312 | } | 314 | } |
313 | catch (Exception e) | 315 | catch (Exception e) |
314 | { | 316 | { |
315 | //m_scriptEngine.Log.Error("ScriptEngine", "Error compiling script: " + e.ToString()); | 317 | //m_scriptEngine.m_log.Error("[ScriptEngine]: Error compiling script: " + e.ToString()); |
316 | try | 318 | try |
317 | { | 319 | { |
318 | // DISPLAY ERROR INWORLD | 320 | // DISPLAY ERROR INWORLD |
@@ -323,7 +325,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine | |||
323 | } | 325 | } |
324 | catch (Exception e2) | 326 | catch (Exception e2) |
325 | { | 327 | { |
326 | m_scriptEngine.Log.Error("ScriptEngine", "Error displaying error in-world: " + e2.ToString()); | 328 | m_scriptEngine.m_log.Error("[ScriptEngine]: Error displaying error in-world: " + e2.ToString()); |
327 | } | 329 | } |
328 | } | 330 | } |
329 | } | 331 | } |
@@ -384,7 +386,7 @@ namespace OpenSim.Grid.ScriptEngine.DotNetEngine | |||
384 | internal void ExecuteEvent(uint localID, LLUUID itemID, string FunctionName, object[] args) | 386 | internal void ExecuteEvent(uint localID, LLUUID itemID, string FunctionName, object[] args) |
385 | { | 387 | { |
386 | // Execute a function in the script | 388 | // Execute a function in the script |
387 | //m_scriptEngine.Log.Verbose("ScriptEngine", "Executing Function localID: " + localID + ", itemID: " + itemID + ", FunctionName: " + FunctionName); | 389 | //m_scriptEngine.m_log.Info("[ScriptEngine]: Executing Function localID: " + localID + ", itemID: " + itemID + ", FunctionName: " + FunctionName); |
388 | LSL_BaseClass Script = m_scriptEngine.m_ScriptManager.GetScript(localID, itemID); | 390 | LSL_BaseClass Script = m_scriptEngine.m_ScriptManager.GetScript(localID, itemID); |
389 | if (Script == null) | 391 | if (Script == null) |
390 | return; | 392 | return; |
diff --git a/OpenSim/Grid/ScriptServer/Application.cs b/OpenSim/Grid/ScriptServer/Application.cs index 5857101..26bd426 100644 --- a/OpenSim/Grid/ScriptServer/Application.cs +++ b/OpenSim/Grid/ScriptServer/Application.cs | |||
@@ -37,6 +37,8 @@ namespace OpenSim.Grid.ScriptServer | |||
37 | 37 | ||
38 | private static void Main(string[] args) | 38 | private static void Main(string[] args) |
39 | { | 39 | { |
40 | log4net.Config.XmlConfigurator.Configure(); | ||
41 | |||
40 | AppDomain.CurrentDomain.UnhandledException += | 42 | AppDomain.CurrentDomain.UnhandledException += |
41 | new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); | 43 | new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); |
42 | 44 | ||
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs index 819a037..595acea 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServer/Region/RegionConnectionManager.cs | |||
@@ -33,14 +33,12 @@ namespace OpenSim.Grid.ScriptServer | |||
33 | // Maintains connection and communication to a region | 33 | // Maintains connection and communication to a region |
34 | public class RegionConnectionManager : RegionBase | 34 | public class RegionConnectionManager : RegionBase |
35 | { | 35 | { |
36 | private LogBase m_log; | ||
37 | private ScriptServerMain m_ScriptServerMain; | 36 | private ScriptServerMain m_ScriptServerMain; |
38 | private object m_Connection; | 37 | private object m_Connection; |
39 | 38 | ||
40 | public RegionConnectionManager(ScriptServerMain scm, LogBase logger, object Connection) | 39 | public RegionConnectionManager(ScriptServerMain scm, object Connection) |
41 | { | 40 | { |
42 | m_ScriptServerMain = scm; | 41 | m_ScriptServerMain = scm; |
43 | m_log = logger; | ||
44 | m_Connection = Connection; | 42 | m_Connection = Connection; |
45 | } | 43 | } |
46 | 44 | ||
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs index 7d29129..524b8c4 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServer/RegionCommManager.cs | |||
@@ -38,13 +38,11 @@ namespace OpenSim.Grid.ScriptServer | |||
38 | 38 | ||
39 | private List<RegionConnectionManager> Regions = new List<RegionConnectionManager>(); | 39 | private List<RegionConnectionManager> Regions = new List<RegionConnectionManager>(); |
40 | 40 | ||
41 | private LogBase m_log; | ||
42 | private ScriptServerMain m_ScriptServerMain; | 41 | private ScriptServerMain m_ScriptServerMain; |
43 | 42 | ||
44 | public RegionCommManager(ScriptServerMain scm, LogBase logger) | 43 | public RegionCommManager(ScriptServerMain scm) |
45 | { | 44 | { |
46 | m_ScriptServerMain = scm; | 45 | m_ScriptServerMain = scm; |
47 | m_log = logger; | ||
48 | } | 46 | } |
49 | 47 | ||
50 | ~RegionCommManager() | 48 | ~RegionCommManager() |
@@ -96,9 +94,8 @@ namespace OpenSim.Grid.ScriptServer | |||
96 | // ~ ask scriptengines if they will accept script? | 94 | // ~ ask scriptengines if they will accept script? |
97 | // - Add script to shared communication channel towards that region | 95 | // - Add script to shared communication channel towards that region |
98 | 96 | ||
99 | |||
100 | // TODO: FAKING A CONNECTION | 97 | // TODO: FAKING A CONNECTION |
101 | Regions.Add(new RegionConnectionManager(m_ScriptServerMain, m_log, null)); | 98 | Regions.Add(new RegionConnectionManager(m_ScriptServerMain, null)); |
102 | } | 99 | } |
103 | } | 100 | } |
104 | } \ No newline at end of file | 101 | } \ No newline at end of file |
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineLoader.cs b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineLoader.cs index c9c0fb0..4bb74f5 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineLoader.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEngineLoader.cs | |||
@@ -35,13 +35,7 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer | |||
35 | { | 35 | { |
36 | internal class ScriptEngineLoader | 36 | internal class ScriptEngineLoader |
37 | { | 37 | { |
38 | private LogBase m_log; | 38 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
39 | |||
40 | |||
41 | public ScriptEngineLoader(LogBase logger) | ||
42 | { | ||
43 | m_log = logger; | ||
44 | } | ||
45 | 39 | ||
46 | public ScriptServerInterfaces.ScriptEngine LoadScriptEngine(string EngineName) | 40 | public ScriptServerInterfaces.ScriptEngine LoadScriptEngine(string EngineName) |
47 | { | 41 | { |
@@ -55,7 +49,7 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer | |||
55 | } | 49 | } |
56 | catch (Exception e) | 50 | catch (Exception e) |
57 | { | 51 | { |
58 | m_log.Error("ScriptEngine", | 52 | m_log.Error("[ScriptEngine]: " + |
59 | "Error loading assembly \"" + EngineName + "\": " + e.Message + ", " + | 53 | "Error loading assembly \"" + EngineName + "\": " + e.Message + ", " + |
60 | e.StackTrace.ToString()); | 54 | e.StackTrace.ToString()); |
61 | } | 55 | } |
@@ -87,7 +81,7 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer | |||
87 | //} | 81 | //} |
88 | //catch (Exception e) | 82 | //catch (Exception e) |
89 | //{ | 83 | //{ |
90 | // m_log.Error("ScriptEngine", "Error loading assembly \String.Empty + FileName + "\": " + e.ToString()); | 84 | // m_log.Error("[ScriptEngine]: Error loading assembly \String.Empty + FileName + "\": " + e.ToString()); |
91 | //} | 85 | //} |
92 | 86 | ||
93 | 87 | ||
@@ -104,7 +98,7 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer | |||
104 | //} | 98 | //} |
105 | //catch (Exception e) | 99 | //catch (Exception e) |
106 | //{ | 100 | //{ |
107 | // m_log.Error("ScriptEngine", "Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString()); | 101 | // m_log.Error("[ScriptEngine]: Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString()); |
108 | //} | 102 | //} |
109 | 103 | ||
110 | ScriptServerInterfaces.ScriptEngine ret; | 104 | ScriptServerInterfaces.ScriptEngine ret; |
@@ -114,7 +108,7 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer | |||
114 | //} | 108 | //} |
115 | //catch (Exception e) | 109 | //catch (Exception e) |
116 | //{ | 110 | //{ |
117 | // m_log.Error("ScriptEngine", "Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString()); | 111 | // m_log.Error("[ScriptEngine]: Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString()); |
118 | //} | 112 | //} |
119 | 113 | ||
120 | return ret; | 114 | return ret; |
diff --git a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs index 3bfca87..7976cb5 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServer/ScriptEnginesManager.cs | |||
@@ -34,17 +34,15 @@ namespace OpenSim.Grid.ScriptServer.ScriptServer | |||
34 | { | 34 | { |
35 | internal class ScriptEngineManager | 35 | internal class ScriptEngineManager |
36 | { | 36 | { |
37 | private LogBase m_log; | ||
38 | private ScriptEngineLoader ScriptEngineLoader; | 37 | private ScriptEngineLoader ScriptEngineLoader; |
39 | private List<ScriptServerInterfaces.ScriptEngine> scriptEngines = new List<ScriptServerInterfaces.ScriptEngine>(); | 38 | private List<ScriptServerInterfaces.ScriptEngine> scriptEngines = new List<ScriptServerInterfaces.ScriptEngine>(); |
40 | private ScriptServerMain m_ScriptServerMain; | 39 | private ScriptServerMain m_ScriptServerMain; |
41 | 40 | ||
42 | // Initialize | 41 | // Initialize |
43 | public ScriptEngineManager(ScriptServerMain scm, LogBase logger) | 42 | public ScriptEngineManager(ScriptServerMain scm) |
44 | { | 43 | { |
45 | m_ScriptServerMain = scm; | 44 | m_ScriptServerMain = scm; |
46 | m_log = logger; | 45 | ScriptEngineLoader = new ScriptEngineLoader(); |
47 | ScriptEngineLoader = new ScriptEngineLoader(m_log); | ||
48 | } | 46 | } |
49 | 47 | ||
50 | ~ScriptEngineManager() | 48 | ~ScriptEngineManager() |
diff --git a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs b/OpenSim/Grid/ScriptServer/ScriptServerMain.cs index 421467d..e2c83f1 100644 --- a/OpenSim/Grid/ScriptServer/ScriptServerMain.cs +++ b/OpenSim/Grid/ScriptServer/ScriptServerMain.cs | |||
@@ -40,11 +40,12 @@ namespace OpenSim.Grid.ScriptServer | |||
40 | { | 40 | { |
41 | public class ScriptServerMain : BaseOpenSimServer, conscmd_callback | 41 | public class ScriptServerMain : BaseOpenSimServer, conscmd_callback |
42 | { | 42 | { |
43 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
44 | |||
43 | // | 45 | // |
44 | // Root object. Creates objects used. | 46 | // Root object. Creates objects used. |
45 | // | 47 | // |
46 | private int listenPort = 8010; | 48 | private int listenPort = 8010; |
47 | private readonly string m_logFilename = ("scriptserver.log"); | ||
48 | 49 | ||
49 | // TEMP | 50 | // TEMP |
50 | public static ScriptServerInterfaces.ScriptEngine Engine; | 51 | public static ScriptServerInterfaces.ScriptEngine Engine; |
@@ -59,16 +60,15 @@ namespace OpenSim.Grid.ScriptServer | |||
59 | 60 | ||
60 | public ScriptServerMain() | 61 | public ScriptServerMain() |
61 | { | 62 | { |
62 | m_log = CreateLog(); | 63 | m_console = CreateConsole(); |
63 | |||
64 | 64 | ||
65 | // Set up script engine mananger | 65 | // Set up script engine mananger |
66 | ScriptEngines = new ScriptEngineManager(this, m_log); | 66 | ScriptEngines = new ScriptEngineManager(this); |
67 | 67 | ||
68 | // Load DotNetEngine | 68 | // Load DotNetEngine |
69 | Engine = ScriptEngines.LoadEngine("DotNetEngine"); | 69 | Engine = ScriptEngines.LoadEngine("DotNetEngine"); |
70 | IConfigSource config = null; | 70 | IConfigSource config = null; |
71 | Engine.InitializeEngine(null, null, m_log, false, Engine.GetScriptManager()); | 71 | Engine.InitializeEngine(null, null, false, Engine.GetScriptManager()); |
72 | 72 | ||
73 | 73 | ||
74 | // Set up server | 74 | // Set up server |
@@ -83,12 +83,12 @@ namespace OpenSim.Grid.ScriptServer | |||
83 | 83 | ||
84 | private void RPC_ReceiveCommand(int ID, string Command, object[] p) | 84 | private void RPC_ReceiveCommand(int ID, string Command, object[] p) |
85 | { | 85 | { |
86 | m_log.Notice("SERVER", "Received command: '" + Command + "'"); | 86 | m_log.Info("[SERVER]: Received command: '" + Command + "'"); |
87 | if (p != null) | 87 | if (p != null) |
88 | { | 88 | { |
89 | for (int i = 0; i < p.Length; i++) | 89 | for (int i = 0; i < p.Length; i++) |
90 | { | 90 | { |
91 | m_log.Notice("SERVER", "Param " + i + ": " + p[i].ToString()); | 91 | m_log.Info("[SERVER]: Param " + i + ": " + p[i].ToString()); |
92 | } | 92 | } |
93 | } | 93 | } |
94 | 94 | ||
@@ -102,14 +102,9 @@ namespace OpenSim.Grid.ScriptServer | |||
102 | { | 102 | { |
103 | } | 103 | } |
104 | 104 | ||
105 | protected LogBase CreateLog() | 105 | protected ConsoleBase CreateConsole() |
106 | { | 106 | { |
107 | if (!Directory.Exists(Util.logDir())) | 107 | return new ConsoleBase("ScriptServer", this); |
108 | { | ||
109 | Directory.CreateDirectory(Util.logDir()); | ||
110 | } | ||
111 | |||
112 | return new LogBase((Path.Combine(Util.logDir(), m_logFilename)), "ScriptServer", this, true); | ||
113 | } | 108 | } |
114 | } | 109 | } |
115 | } | 110 | } |
diff --git a/OpenSim/Grid/UserServer.Config/DbUserConfig.cs b/OpenSim/Grid/UserServer.Config/DbUserConfig.cs index d2736c6..865dfea 100644 --- a/OpenSim/Grid/UserServer.Config/DbUserConfig.cs +++ b/OpenSim/Grid/UserServer.Config/DbUserConfig.cs | |||
@@ -35,9 +35,11 @@ namespace OpenUser.Config.UserConfigDb4o | |||
35 | { | 35 | { |
36 | public class Db4oConfigPlugin: IUserConfig | 36 | public class Db4oConfigPlugin: IUserConfig |
37 | { | 37 | { |
38 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
39 | |||
38 | public UserConfig GetConfigObject() | 40 | public UserConfig GetConfigObject() |
39 | { | 41 | { |
40 | MainLog.Instance.Verbose("DBUSERCONFIG", "Loading Db40Config dll"); | 42 | m_log.Info("[DBUSERCONFIG]: Loading Db40Config dll"); |
41 | return ( new DbUserConfig()); | 43 | return ( new DbUserConfig()); |
42 | } | 44 | } |
43 | } | 45 | } |
@@ -48,13 +50,13 @@ namespace OpenUser.Config.UserConfigDb4o | |||
48 | 50 | ||
49 | public void LoadDefaults() | 51 | public void LoadDefaults() |
50 | { | 52 | { |
51 | MainLog.Instance.Notice("DbUserConfig.cs:LoadDefaults() - Please press enter to retain default or enter new settings"); | 53 | m_log.Info("DbUserConfig.cs:LoadDefaults() - Please press enter to retain default or enter new settings"); |
52 | 54 | ||
53 | this.DefaultStartupMsg = MainLog.Instance.CmdPrompt("Default startup message", "Welcome to OGS"); | 55 | this.DefaultStartupMsg = m_log.CmdPrompt("Default startup message", "Welcome to OGS"); |
54 | 56 | ||
55 | this.GridServerURL = MainLog.Instance.CmdPrompt("Grid server URL","http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString() + "/"); | 57 | this.GridServerURL = m_log.CmdPrompt("Grid server URL","http://127.0.0.1:" + GridConfig.DefaultHttpPort.ToString() + "/"); |
56 | this.GridSendKey = MainLog.Instance.CmdPrompt("Key to send to grid server","null"); | 58 | this.GridSendKey = m_log.CmdPrompt("Key to send to grid server","null"); |
57 | this.GridRecvKey = MainLog.Instance.CmdPrompt("Key to expect from grid server","null"); | 59 | this.GridRecvKey = m_log.CmdPrompt("Key to expect from grid server","null"); |
58 | } | 60 | } |
59 | 61 | ||
60 | public override void InitConfig() | 62 | public override void InitConfig() |
@@ -65,7 +67,7 @@ namespace OpenUser.Config.UserConfigDb4o | |||
65 | IObjectSet result = db.Get(typeof(DbUserConfig)); | 67 | IObjectSet result = db.Get(typeof(DbUserConfig)); |
66 | if(result.Count==1) | 68 | if(result.Count==1) |
67 | { | 69 | { |
68 | MainLog.Instance.Verbose("DBUSERCONFIG", "DbUserConfig.cs:InitConfig() - Found a UserConfig object in the local database, loading"); | 70 | m_log.Info("[DBUSERCONFIG]: DbUserConfig.cs:InitConfig() - Found a UserConfig object in the local database, loading"); |
69 | foreach (DbUserConfig cfg in result) | 71 | foreach (DbUserConfig cfg in result) |
70 | { | 72 | { |
71 | this.GridServerURL=cfg.GridServerURL; | 73 | this.GridServerURL=cfg.GridServerURL; |
@@ -76,24 +78,24 @@ namespace OpenUser.Config.UserConfigDb4o | |||
76 | } | 78 | } |
77 | else | 79 | else |
78 | { | 80 | { |
79 | MainLog.Instance.Verbose("DBUSERCONFIG", "DbUserConfig.cs:InitConfig() - Could not find object in database, loading precompiled defaults"); | 81 | m_log.Info("[DBUSERCONFIG]: DbUserConfig.cs:InitConfig() - Could not find object in database, loading precompiled defaults"); |
80 | LoadDefaults(); | 82 | LoadDefaults(); |
81 | MainLog.Instance.Verbose("DBUSERCONFIG", "Writing out default settings to local database"); | 83 | m_log.Info("[DBUSERCONFIG]: Writing out default settings to local database"); |
82 | db.Set(this); | 84 | db.Set(this); |
83 | db.Close(); | 85 | db.Close(); |
84 | } | 86 | } |
85 | } | 87 | } |
86 | catch(Exception e) | 88 | catch(Exception e) |
87 | { | 89 | { |
88 | MainLog.Instance.Warn("DbUserConfig.cs:InitConfig() - Exception occured"); | 90 | m_log.Warn("DbUserConfig.cs:InitConfig() - Exception occured"); |
89 | MainLog.Instance.Warn(e.ToString()); | 91 | m_log.Warn(e.ToString()); |
90 | } | 92 | } |
91 | 93 | ||
92 | MainLog.Instance.Verbose("DBUSERCONFIG", "User settings loaded:"); | 94 | m_log.Info("[DBUSERCONFIG]: User settings loaded:"); |
93 | MainLog.Instance.Verbose("DBUSERCONFIG", "Default startup message: " + this.DefaultStartupMsg); | 95 | m_log.Info("[DBUSERCONFIG]: Default startup message: " + this.DefaultStartupMsg); |
94 | MainLog.Instance.Verbose("DBUSERCONFIG", "Grid server URL: " + this.GridServerURL); | 96 | m_log.Info("[DBUSERCONFIG]: Grid server URL: " + this.GridServerURL); |
95 | MainLog.Instance.Verbose("DBUSERCONFIG", "Key to send to grid: " + this.GridSendKey); | 97 | m_log.Info("[DBUSERCONFIG]: Key to send to grid: " + this.GridSendKey); |
96 | MainLog.Instance.Verbose("DBUSERCONFIG", "Key to expect from grid: " + this.GridRecvKey); | 98 | m_log.Info("[DBUSERCONFIG]: Key to expect from grid: " + this.GridRecvKey); |
97 | } | 99 | } |
98 | 100 | ||
99 | public void Shutdown() | 101 | public void Shutdown() |
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index 32cefc1..8b9fd62 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs | |||
@@ -42,6 +42,8 @@ namespace OpenSim.Grid.UserServer | |||
42 | /// </summary> | 42 | /// </summary> |
43 | public class OpenUser_Main : BaseOpenSimServer, conscmd_callback | 43 | public class OpenUser_Main : BaseOpenSimServer, conscmd_callback |
44 | { | 44 | { |
45 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | |||
45 | private UserConfig Cfg; | 47 | private UserConfig Cfg; |
46 | 48 | ||
47 | public UserManager m_userManager; | 49 | public UserManager m_userManager; |
@@ -53,7 +55,9 @@ namespace OpenSim.Grid.UserServer | |||
53 | [STAThread] | 55 | [STAThread] |
54 | public static void Main(string[] args) | 56 | public static void Main(string[] args) |
55 | { | 57 | { |
56 | Console.WriteLine("Launching UserServer..."); | 58 | log4net.Config.XmlConfigurator.Configure(); |
59 | |||
60 | m_log.Info("Launching UserServer..."); | ||
57 | 61 | ||
58 | OpenUser_Main userserver = new OpenUser_Main(); | 62 | OpenUser_Main userserver = new OpenUser_Main(); |
59 | 63 | ||
@@ -63,22 +67,17 @@ namespace OpenSim.Grid.UserServer | |||
63 | 67 | ||
64 | private OpenUser_Main() | 68 | private OpenUser_Main() |
65 | { | 69 | { |
66 | if (!Directory.Exists(Util.logDir())) | 70 | m_console = new ConsoleBase("OpenUser", this); |
67 | { | 71 | MainConsole.Instance = m_console; |
68 | Directory.CreateDirectory(Util.logDir()); | ||
69 | } | ||
70 | m_log = | ||
71 | new LogBase((Path.Combine(Util.logDir(), "opengrid-userserver-console.log")), "OpenUser", this, true); | ||
72 | MainLog.Instance = m_log; | ||
73 | } | 72 | } |
74 | 73 | ||
75 | private void Work() | 74 | private void Work() |
76 | { | 75 | { |
77 | m_log.Notice("Enter help for a list of commands\n"); | 76 | m_console.Notice("Enter help for a list of commands\n"); |
78 | 77 | ||
79 | while (true) | 78 | while (true) |
80 | { | 79 | { |
81 | m_log.MainLogPrompt(); | 80 | m_console.Prompt(); |
82 | } | 81 | } |
83 | } | 82 | } |
84 | 83 | ||
@@ -88,7 +87,7 @@ namespace OpenSim.Grid.UserServer | |||
88 | 87 | ||
89 | StatsManager.StartCollectingUserStats(); | 88 | StatsManager.StartCollectingUserStats(); |
90 | 89 | ||
91 | MainLog.Instance.Verbose("REGION", "Establishing data connection"); | 90 | m_log.Info("[REGION]: Establishing data connection"); |
92 | m_userManager = new UserManager(); | 91 | m_userManager = new UserManager(); |
93 | m_userManager._config = Cfg; | 92 | m_userManager._config = Cfg; |
94 | m_userManager.AddPlugin(Cfg.DatabaseProvider); | 93 | m_userManager.AddPlugin(Cfg.DatabaseProvider); |
@@ -96,11 +95,11 @@ namespace OpenSim.Grid.UserServer | |||
96 | m_loginService = new UserLoginService( | 95 | m_loginService = new UserLoginService( |
97 | m_userManager, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg); | 96 | m_userManager, new LibraryRootFolder(), Cfg, Cfg.DefaultStartupMsg); |
98 | 97 | ||
99 | m_messagesService = new MessageServersConnector(MainLog.Instance); | 98 | m_messagesService = new MessageServersConnector(); |
100 | 99 | ||
101 | m_loginService.OnUserLoggedInAtLocation += NotifyMessageServersUserLoggedInToLocation; | 100 | m_loginService.OnUserLoggedInAtLocation += NotifyMessageServersUserLoggedInToLocation; |
102 | 101 | ||
103 | MainLog.Instance.Verbose("REGION", "Starting HTTP process"); | 102 | m_log.Info("[REGION]: Starting HTTP process"); |
104 | BaseHttpServer httpServer = new BaseHttpServer(Cfg.HttpPort); | 103 | BaseHttpServer httpServer = new BaseHttpServer(Cfg.HttpPort); |
105 | 104 | ||
106 | httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod); | 105 | httpServer.AddXmlRPCHandler("login_to_simulator", m_loginService.XmlRpcLoginMethod); |
@@ -128,10 +127,9 @@ namespace OpenSim.Grid.UserServer | |||
128 | new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod)); | 127 | new RestStreamHandler("DELETE", "/usersessions/", m_userManager.RestDeleteUserSessionMethod)); |
129 | 128 | ||
130 | httpServer.Start(); | 129 | httpServer.Start(); |
131 | m_log.Status("SERVER", "Userserver 0.4 - Startup complete"); | 130 | m_log.Info("[SERVER]: Userserver 0.4 - Startup complete"); |
132 | } | 131 | } |
133 | 132 | ||
134 | |||
135 | public void do_create(string what) | 133 | public void do_create(string what) |
136 | { | 134 | { |
137 | switch (what) | 135 | switch (what) |
@@ -143,11 +141,11 @@ namespace OpenSim.Grid.UserServer | |||
143 | uint regX = 1000; | 141 | uint regX = 1000; |
144 | uint regY = 1000; | 142 | uint regY = 1000; |
145 | 143 | ||
146 | tempfirstname = m_log.CmdPrompt("First name"); | 144 | tempfirstname = m_console.CmdPrompt("First name"); |
147 | templastname = m_log.CmdPrompt("Last name"); | 145 | templastname = m_console.CmdPrompt("Last name"); |
148 | tempMD5Passwd = m_log.PasswdPrompt("Password"); | 146 | tempMD5Passwd = m_console.PasswdPrompt("Password"); |
149 | regX = Convert.ToUInt32(m_log.CmdPrompt("Start Region X")); | 147 | regX = Convert.ToUInt32(m_console.CmdPrompt("Start Region X")); |
150 | regY = Convert.ToUInt32(m_log.CmdPrompt("Start Region Y")); | 148 | regY = Convert.ToUInt32(m_console.CmdPrompt("Start Region Y")); |
151 | 149 | ||
152 | tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + String.Empty); | 150 | tempMD5Passwd = Util.Md5Hash(Util.Md5Hash(tempMD5Passwd) + ":" + String.Empty); |
153 | 151 | ||
@@ -158,7 +156,7 @@ namespace OpenSim.Grid.UserServer | |||
158 | m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); | 156 | m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); |
159 | } catch (Exception ex) | 157 | } catch (Exception ex) |
160 | { | 158 | { |
161 | m_log.Error("SERVER", "Error creating user: {0}", ex.ToString()); | 159 | m_log.Error(String.Format("[SERVER]: Error creating user: {0}", ex.ToString())); |
162 | } | 160 | } |
163 | 161 | ||
164 | try | 162 | try |
@@ -168,7 +166,7 @@ namespace OpenSim.Grid.UserServer | |||
168 | } | 166 | } |
169 | catch (Exception ex) | 167 | catch (Exception ex) |
170 | { | 168 | { |
171 | m_log.Error("SERVER", "Error creating inventory for user: {0}", ex.ToString()); | 169 | m_log.Error(String.Format("[SERVER]: Error creating inventory for user: {0}", ex.ToString())); |
172 | } | 170 | } |
173 | m_lastCreatedUser = userID; | 171 | m_lastCreatedUser = userID; |
174 | break; | 172 | break; |
@@ -182,9 +180,9 @@ namespace OpenSim.Grid.UserServer | |||
182 | switch (cmd) | 180 | switch (cmd) |
183 | { | 181 | { |
184 | case "help": | 182 | case "help": |
185 | m_log.Notice("create user - create a new user"); | 183 | m_console.Notice("create user - create a new user"); |
186 | m_log.Notice("stats - statistical information for this server"); | 184 | m_console.Notice("stats - statistical information for this server"); |
187 | m_log.Notice("shutdown - shutdown the grid (USE CAUTION!)"); | 185 | m_console.Notice("shutdown - shutdown the grid (USE CAUTION!)"); |
188 | break; | 186 | break; |
189 | 187 | ||
190 | case "create": | 188 | case "create": |
@@ -193,12 +191,12 @@ namespace OpenSim.Grid.UserServer | |||
193 | 191 | ||
194 | case "shutdown": | 192 | case "shutdown": |
195 | m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation; | 193 | m_loginService.OnUserLoggedInAtLocation -= NotifyMessageServersUserLoggedInToLocation; |
196 | m_log.Close(); | 194 | m_console.Close(); |
197 | Environment.Exit(0); | 195 | Environment.Exit(0); |
198 | break; | 196 | break; |
199 | 197 | ||
200 | case "stats": | 198 | case "stats": |
201 | MainLog.Instance.Notice("STATS", Environment.NewLine + StatsManager.UserStats.Report()); | 199 | m_console.Notice(StatsManager.UserStats.Report()); |
202 | break; | 200 | break; |
203 | 201 | ||
204 | case "test-inventory": | 202 | case "test-inventory": |
@@ -218,8 +216,9 @@ namespace OpenSim.Grid.UserServer | |||
218 | 216 | ||
219 | public void TestResponse(List<InventoryFolderBase> resp) | 217 | public void TestResponse(List<InventoryFolderBase> resp) |
220 | { | 218 | { |
221 | Console.WriteLine("response got"); | 219 | m_console.Notice("response got"); |
222 | } | 220 | } |
221 | |||
223 | public void NotifyMessageServersUserLoggedInToLocation(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, ulong regionhandle, LLVector3 Position) | 222 | public void NotifyMessageServersUserLoggedInToLocation(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, ulong regionhandle, LLVector3 Position) |
224 | { | 223 | { |
225 | m_messagesService.TellMessageServersAboutUser(agentID, sessionID, RegionID, regionhandle, Position); | 224 | m_messagesService.TellMessageServersAboutUser(agentID, sessionID, RegionID, regionhandle, Position); |
diff --git a/OpenSim/Grid/UserServer/MessageServersConnector.cs b/OpenSim/Grid/UserServer/MessageServersConnector.cs index 93d5925..251644b 100644 --- a/OpenSim/Grid/UserServer/MessageServersConnector.cs +++ b/OpenSim/Grid/UserServer/MessageServersConnector.cs | |||
@@ -39,15 +39,14 @@ using OpenSim.Framework.Servers; | |||
39 | 39 | ||
40 | namespace OpenSim.Grid.UserServer | 40 | namespace OpenSim.Grid.UserServer |
41 | { | 41 | { |
42 | |||
43 | public class MessageServersConnector | 42 | public class MessageServersConnector |
44 | { | 43 | { |
45 | private LogBase m_log; | 44 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
45 | |||
46 | public Dictionary<string, MessageServerInfo> MessageServers; | 46 | public Dictionary<string, MessageServerInfo> MessageServers; |
47 | 47 | ||
48 | public MessageServersConnector(LogBase log) | 48 | public MessageServersConnector() |
49 | { | 49 | { |
50 | m_log=log; | ||
51 | MessageServers = new Dictionary<string, MessageServerInfo>(); | 50 | MessageServers = new Dictionary<string, MessageServerInfo>(); |
52 | } | 51 | } |
53 | 52 | ||
@@ -65,7 +64,7 @@ namespace OpenSim.Grid.UserServer | |||
65 | { | 64 | { |
66 | if (!MessageServers.ContainsKey(URI)) | 65 | if (!MessageServers.ContainsKey(URI)) |
67 | { | 66 | { |
68 | m_log.Warn("MSGSERVER", "Got addResponsibleRegion Request for a MessageServer that isn't registered"); | 67 | m_log.Warn("[MSGSERVER]: Got addResponsibleRegion Request for a MessageServer that isn't registered"); |
69 | } | 68 | } |
70 | else | 69 | else |
71 | { | 70 | { |
@@ -78,7 +77,7 @@ namespace OpenSim.Grid.UserServer | |||
78 | { | 77 | { |
79 | if (!MessageServers.ContainsKey(URI)) | 78 | if (!MessageServers.ContainsKey(URI)) |
80 | { | 79 | { |
81 | m_log.Warn("MSGSERVER", "Got RemoveResponsibleRegion Request for a MessageServer that isn't registered"); | 80 | m_log.Warn("[MSGSERVER]: Got RemoveResponsibleRegion Request for a MessageServer that isn't registered"); |
82 | } | 81 | } |
83 | else | 82 | else |
84 | { | 83 | { |
@@ -175,10 +174,7 @@ namespace OpenSim.Grid.UserServer | |||
175 | 174 | ||
176 | XmlRpcRequest GridReq = new XmlRpcRequest("login_to_simulator", SendParams); | 175 | XmlRpcRequest GridReq = new XmlRpcRequest("login_to_simulator", SendParams); |
177 | XmlRpcResponse GridResp = GridReq.Send(serv.URI, 6000); | 176 | XmlRpcResponse GridResp = GridReq.Send(serv.URI, 6000); |
178 | m_log.Verbose("LOGIN","Notified : " + serv.URI + " about user login"); | 177 | m_log.Info("[LOGIN]: Notified : " + serv.URI + " about user login"); |
179 | |||
180 | } | 178 | } |
181 | |||
182 | |||
183 | } | 179 | } |
184 | } | 180 | } |
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index 10f9468..d5cdf1c 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs | |||
@@ -46,9 +46,10 @@ namespace OpenSim.Grid.UserServer | |||
46 | { | 46 | { |
47 | public delegate void UserLoggedInAtLocation(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, ulong regionhandle, LLVector3 Position); | 47 | public delegate void UserLoggedInAtLocation(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, ulong regionhandle, LLVector3 Position); |
48 | 48 | ||
49 | |||
50 | public class UserLoginService : LoginService | 49 | public class UserLoginService : LoginService |
51 | { | 50 | { |
51 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
52 | |||
52 | public event UserLoggedInAtLocation OnUserLoggedInAtLocation; | 53 | public event UserLoggedInAtLocation OnUserLoggedInAtLocation; |
53 | 54 | ||
54 | public UserConfig m_config; | 55 | public UserConfig m_config; |
@@ -70,7 +71,7 @@ namespace OpenSim.Grid.UserServer | |||
70 | { | 71 | { |
71 | bool tryDefault = false; | 72 | bool tryDefault = false; |
72 | //CFK: Since the try is always "tried", the "Home Location" message should always appear, so comment this one. | 73 | //CFK: Since the try is always "tried", the "Home Location" message should always appear, so comment this one. |
73 | //CFK: MainLog.Instance.Verbose("LOGIN", "Load information from the gridserver"); | 74 | //CFK: m_log.Info("[LOGIN]: Load information from the gridserver"); |
74 | RegionProfileData SimInfo = new RegionProfileData(); | 75 | RegionProfileData SimInfo = new RegionProfileData(); |
75 | try | 76 | try |
76 | { | 77 | { |
@@ -80,7 +81,7 @@ namespace OpenSim.Grid.UserServer | |||
80 | 81 | ||
81 | // Customise the response | 82 | // Customise the response |
82 | //CFK: This is redundant and the next message should always appear. | 83 | //CFK: This is redundant and the next message should always appear. |
83 | //CFK: MainLog.Instance.Verbose("LOGIN", "Home Location"); | 84 | //CFK: m_log.Info("[LOGIN]: Home Location"); |
84 | response.Home = "{'region_handle':[r" + (SimInfo.regionLocX*256).ToString() + ",r" + | 85 | response.Home = "{'region_handle':[r" + (SimInfo.regionLocX*256).ToString() + ",r" + |
85 | (SimInfo.regionLocY*256).ToString() + "], " + | 86 | (SimInfo.regionLocY*256).ToString() + "], " + |
86 | "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + | 87 | "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + |
@@ -91,7 +92,7 @@ namespace OpenSim.Grid.UserServer | |||
91 | // Destination | 92 | // Destination |
92 | //CFK: The "Notifying" message always seems to appear, so subsume the data from this message into | 93 | //CFK: The "Notifying" message always seems to appear, so subsume the data from this message into |
93 | //CFK: the next one for X & Y and comment this one. | 94 | //CFK: the next one for X & Y and comment this one. |
94 | //CFK: MainLog.Instance.Verbose("LOGIN", "CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + | 95 | //CFK: m_log.Info("[LOGIN]: CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + |
95 | //CFK: "; Region Y: " + SimInfo.regionLocY); | 96 | //CFK: "; Region Y: " + SimInfo.regionLocY); |
96 | response.SimAddress = Util.GetHostFromDNS(SimInfo.serverIP).ToString(); | 97 | response.SimAddress = Util.GetHostFromDNS(SimInfo.serverIP).ToString(); |
97 | response.SimPort = (uint) SimInfo.serverPort; | 98 | response.SimPort = (uint) SimInfo.serverPort; |
@@ -105,7 +106,7 @@ namespace OpenSim.Grid.UserServer | |||
105 | // Notify the target of an incoming user | 106 | // Notify the target of an incoming user |
106 | //CFK: The "Notifying" message always seems to appear, so subsume the data from this message into | 107 | //CFK: The "Notifying" message always seems to appear, so subsume the data from this message into |
107 | //CFK: the next one for X & Y and comment this one. | 108 | //CFK: the next one for X & Y and comment this one. |
108 | //CFK: MainLog.Instance.Verbose("LOGIN", SimInfo.regionName + " (" + SimInfo.serverURI + ") " + | 109 | //CFK: m_log.Info("[LOGIN]: " + SimInfo.regionName + " (" + SimInfo.serverURI + ") " + |
109 | //CFK: SimInfo.regionLocX + "," + SimInfo.regionLocY); | 110 | //CFK: SimInfo.regionLocX + "," + SimInfo.regionLocY); |
110 | 111 | ||
111 | // Prepare notification | 112 | // Prepare notification |
@@ -128,7 +129,7 @@ namespace OpenSim.Grid.UserServer | |||
128 | theUser.currentAgent.currentRegion = SimInfo.UUID; | 129 | theUser.currentAgent.currentRegion = SimInfo.UUID; |
129 | theUser.currentAgent.currentHandle = SimInfo.regionHandle; | 130 | theUser.currentAgent.currentHandle = SimInfo.regionHandle; |
130 | 131 | ||
131 | MainLog.Instance.Verbose("LOGIN", SimInfo.regionName + " @ " + SimInfo.httpServerURI + " " + | 132 | m_log.Info("[LOGIN]: " + SimInfo.regionName + " @ " + SimInfo.httpServerURI + " " + |
132 | SimInfo.regionLocX + "," + SimInfo.regionLocY); | 133 | SimInfo.regionLocX + "," + SimInfo.regionLocY); |
133 | 134 | ||
134 | XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); | 135 | XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); |
@@ -145,9 +146,8 @@ namespace OpenSim.Grid.UserServer | |||
145 | 146 | ||
146 | ulong defaultHandle = (((ulong) m_config.DefaultX*256) << 32) | ((ulong) m_config.DefaultY*256); | 147 | ulong defaultHandle = (((ulong) m_config.DefaultX*256) << 32) | ((ulong) m_config.DefaultY*256); |
147 | 148 | ||
148 | MainLog.Instance.Warn( | 149 | m_log.Warn( |
149 | "LOGIN", | 150 | "[LOGIN]: Home region not available: sending to default " + defaultHandle.ToString()); |
150 | "Home region not available: sending to default " + defaultHandle.ToString()); | ||
151 | 151 | ||
152 | SimInfo = new RegionProfileData(); | 152 | SimInfo = new RegionProfileData(); |
153 | try | 153 | try |
@@ -157,7 +157,7 @@ namespace OpenSim.Grid.UserServer | |||
157 | m_config.GridSendKey, m_config.GridRecvKey); | 157 | m_config.GridSendKey, m_config.GridRecvKey); |
158 | 158 | ||
159 | // Customise the response | 159 | // Customise the response |
160 | MainLog.Instance.Verbose("LOGIN", "Home Location"); | 160 | m_log.Info("[LOGIN]: Home Location"); |
161 | response.Home = "{'region_handle':[r" + (SimInfo.regionLocX*256).ToString() + ",r" + | 161 | response.Home = "{'region_handle':[r" + (SimInfo.regionLocX*256).ToString() + ",r" + |
162 | (SimInfo.regionLocY*256).ToString() + "], " + | 162 | (SimInfo.regionLocY*256).ToString() + "], " + |
163 | "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + | 163 | "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + |
@@ -166,9 +166,9 @@ namespace OpenSim.Grid.UserServer | |||
166 | theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; | 166 | theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; |
167 | 167 | ||
168 | // Destination | 168 | // Destination |
169 | MainLog.Instance.Verbose("LOGIN", | 169 | m_log.Info("[LOGIN]: " + |
170 | "CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " + | 170 | "CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " + |
171 | SimInfo.regionLocY); | 171 | SimInfo.regionLocY); |
172 | response.SimAddress = Util.GetHostFromDNS(SimInfo.serverIP).ToString(); | 172 | response.SimAddress = Util.GetHostFromDNS(SimInfo.serverIP).ToString(); |
173 | response.SimPort = (uint) SimInfo.serverPort; | 173 | response.SimPort = (uint) SimInfo.serverPort; |
174 | response.RegionX = SimInfo.regionLocX; | 174 | response.RegionX = SimInfo.regionLocX; |
@@ -179,7 +179,7 @@ namespace OpenSim.Grid.UserServer | |||
179 | response.SeedCapability = SimInfo.httpServerURI + "CAPS/" + capsPath + "0000/"; | 179 | response.SeedCapability = SimInfo.httpServerURI + "CAPS/" + capsPath + "0000/"; |
180 | 180 | ||
181 | // Notify the target of an incoming user | 181 | // Notify the target of an incoming user |
182 | MainLog.Instance.Verbose("LOGIN", "Notifying " + SimInfo.regionName + " (" + SimInfo.serverURI + ")"); | 182 | m_log.Info("[LOGIN]: Notifying " + SimInfo.regionName + " (" + SimInfo.serverURI + ")"); |
183 | 183 | ||
184 | // Update agent with target sim | 184 | // Update agent with target sim |
185 | theUser.currentAgent.currentRegion = SimInfo.UUID; | 185 | theUser.currentAgent.currentRegion = SimInfo.UUID; |
@@ -201,7 +201,7 @@ namespace OpenSim.Grid.UserServer | |||
201 | ArrayList SendParams = new ArrayList(); | 201 | ArrayList SendParams = new ArrayList(); |
202 | SendParams.Add(SimParams); | 202 | SendParams.Add(SimParams); |
203 | 203 | ||
204 | MainLog.Instance.Verbose("LOGIN", "Informing region at " + SimInfo.httpServerURI); | 204 | m_log.Info("[LOGIN]: Informing region at " + SimInfo.httpServerURI); |
205 | // Send | 205 | // Send |
206 | XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); | 206 | XmlRpcRequest GridReq = new XmlRpcRequest("expect_user", SendParams); |
207 | XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 6000); | 207 | XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 6000); |
@@ -213,8 +213,8 @@ namespace OpenSim.Grid.UserServer | |||
213 | 213 | ||
214 | catch (Exception e) | 214 | catch (Exception e) |
215 | { | 215 | { |
216 | MainLog.Instance.Warn("LOGIN", "Default region also not available"); | 216 | m_log.Warn("[LOGIN]: Default region also not available"); |
217 | MainLog.Instance.Warn("LOGIN", e.ToString()); | 217 | m_log.Warn("[LOGIN]: " + e.ToString()); |
218 | } | 218 | } |
219 | } | 219 | } |
220 | } | 220 | } |
@@ -230,8 +230,8 @@ namespace OpenSim.Grid.UserServer | |||
230 | // which does. | 230 | // which does. |
231 | if (null == folders | folders.Count == 0) | 231 | if (null == folders | folders.Count == 0) |
232 | { | 232 | { |
233 | MainLog.Instance.Warn( | 233 | m_log.Warn( |
234 | "LOGIN", | 234 | "[LOGIN]: " + |
235 | "A root inventory folder for user ID " + userID + " was not found. A new set" | 235 | "A root inventory folder for user ID " + userID + " was not found. A new set" |
236 | + " of empty inventory folders is being created."); | 236 | + " of empty inventory folders is being created."); |
237 | 237 | ||
@@ -269,8 +269,8 @@ namespace OpenSim.Grid.UserServer | |||
269 | } | 269 | } |
270 | else | 270 | else |
271 | { | 271 | { |
272 | MainLog.Instance.Warn("LOGIN", "The root inventory folder could still not be retrieved" + | 272 | m_log.Warn("[LOGIN]: The root inventory folder could still not be retrieved" + |
273 | " for user ID " + userID); | 273 | " for user ID " + userID); |
274 | 274 | ||
275 | AgentInventory userInventory = new AgentInventory(); | 275 | AgentInventory userInventory = new AgentInventory(); |
276 | userInventory.CreateRootFolder(userID, false); | 276 | userInventory.CreateRootFolder(userID, false); |
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index c36de7f..8f2d83c 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs | |||
@@ -39,6 +39,8 @@ namespace OpenSim.Grid.UserServer | |||
39 | { | 39 | { |
40 | public class UserManager : UserManagerBase | 40 | public class UserManager : UserManagerBase |
41 | { | 41 | { |
42 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
43 | |||
42 | /// <summary> | 44 | /// <summary> |
43 | /// Deletes an active agent session | 45 | /// Deletes an active agent session |
44 | /// </summary> | 46 | /// </summary> |
@@ -106,6 +108,7 @@ namespace OpenSim.Grid.UserServer | |||
106 | 108 | ||
107 | return response; | 109 | return response; |
108 | } | 110 | } |
111 | |||
109 | /// <summary> | 112 | /// <summary> |
110 | /// Converts a user profile to an XML element which can be returned | 113 | /// Converts a user profile to an XML element which can be returned |
111 | /// </summary> | 114 | /// </summary> |
@@ -202,7 +205,6 @@ namespace OpenSim.Grid.UserServer | |||
202 | responseData["returnString"] = returnString; | 205 | responseData["returnString"] = returnString; |
203 | response.Value = responseData; | 206 | response.Value = responseData; |
204 | return response; | 207 | return response; |
205 | |||
206 | } | 208 | } |
207 | 209 | ||
208 | public XmlRpcResponse XmlRpcResponseXmlRPCUpdateUserFriendPerms(XmlRpcRequest request) | 210 | public XmlRpcResponse XmlRpcResponseXmlRPCUpdateUserFriendPerms(XmlRpcRequest request) |
@@ -212,8 +214,6 @@ namespace OpenSim.Grid.UserServer | |||
212 | Hashtable responseData = new Hashtable(); | 214 | Hashtable responseData = new Hashtable(); |
213 | string returnString = "FALSE"; | 215 | string returnString = "FALSE"; |
214 | 216 | ||
215 | |||
216 | |||
217 | if (requestData.Contains("ownerID") && requestData.Contains("friendID") && requestData.Contains("friendPerms")) | 217 | if (requestData.Contains("ownerID") && requestData.Contains("friendID") && requestData.Contains("friendPerms")) |
218 | { | 218 | { |
219 | UpdateUserFriendPerms(new LLUUID((string)requestData["ownerID"]), new LLUUID((string)requestData["friendID"]), (uint)Convert.ToInt32((string)requestData["friendPerms"])); | 219 | UpdateUserFriendPerms(new LLUUID((string)requestData["ownerID"]), new LLUUID((string)requestData["friendID"]), (uint)Convert.ToInt32((string)requestData["friendPerms"])); |
@@ -233,8 +233,6 @@ namespace OpenSim.Grid.UserServer | |||
233 | 233 | ||
234 | List<FriendListItem> returndata = new List<FriendListItem>(); | 234 | List<FriendListItem> returndata = new List<FriendListItem>(); |
235 | 235 | ||
236 | |||
237 | |||
238 | if (requestData.Contains("ownerID")) | 236 | if (requestData.Contains("ownerID")) |
239 | { | 237 | { |
240 | returndata = this.GetUserFriendList(new LLUUID((string)requestData["ownerID"])); | 238 | returndata = this.GetUserFriendList(new LLUUID((string)requestData["ownerID"])); |
@@ -309,7 +307,6 @@ namespace OpenSim.Grid.UserServer | |||
309 | return CreateUnknownUserErrorResponse(); | 307 | return CreateUnknownUserErrorResponse(); |
310 | } | 308 | } |
311 | 309 | ||
312 | |||
313 | return ProfileToXmlRPCResponse(userProfile); | 310 | return ProfileToXmlRPCResponse(userProfile); |
314 | } | 311 | } |
315 | 312 | ||
@@ -318,7 +315,6 @@ namespace OpenSim.Grid.UserServer | |||
318 | XmlRpcResponse response = new XmlRpcResponse(); | 315 | XmlRpcResponse response = new XmlRpcResponse(); |
319 | Hashtable requestData = (Hashtable)request.Params[0]; | 316 | Hashtable requestData = (Hashtable)request.Params[0]; |
320 | 317 | ||
321 | |||
322 | UserProfileData userProfile; | 318 | UserProfileData userProfile; |
323 | 319 | ||
324 | if (requestData.Contains("avatar_uuid")) | 320 | if (requestData.Contains("avatar_uuid")) |
@@ -336,17 +332,15 @@ namespace OpenSim.Grid.UserServer | |||
336 | } | 332 | } |
337 | catch (FormatException) | 333 | catch (FormatException) |
338 | { | 334 | { |
339 | OpenSim.Framework.Console.MainLog.Instance.Warn("LOGOUT", "Error in Logout XMLRPC Params"); | 335 | m_log.Warn("[LOGOUT]: Error in Logout XMLRPC Params"); |
340 | return response; | 336 | return response; |
341 | } | 337 | } |
342 | |||
343 | } | 338 | } |
344 | else | 339 | else |
345 | { | 340 | { |
346 | return CreateUnknownUserErrorResponse(); | 341 | return CreateUnknownUserErrorResponse(); |
347 | } | 342 | } |
348 | 343 | ||
349 | |||
350 | return response; | 344 | return response; |
351 | } | 345 | } |
352 | 346 | ||
diff --git a/OpenSim/Region/Application/Application.cs b/OpenSim/Region/Application/Application.cs index 4c4d315..f1db8d6 100644 --- a/OpenSim/Region/Application/Application.cs +++ b/OpenSim/Region/Application/Application.cs | |||
@@ -35,17 +35,20 @@ namespace OpenSim | |||
35 | { | 35 | { |
36 | public class Application | 36 | public class Application |
37 | { | 37 | { |
38 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
39 | |||
38 | public static string iniFilePath = ""; | 40 | public static string iniFilePath = ""; |
39 | 41 | ||
40 | //could move our main function into OpenSimMain and kill this class | 42 | //could move our main function into OpenSimMain and kill this class |
41 | [STAThread] | 43 | [STAThread] |
42 | public static void Main(string[] args) | 44 | public static void Main(string[] args) |
43 | { | 45 | { |
46 | log4net.Config.XmlConfigurator.Configure(); | ||
47 | |||
44 | AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); | 48 | AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(CurrentDomain_UnhandledException); |
45 | 49 | ||
46 | Console.WriteLine("OpenSim " + VersionInfo.Version + "\n"); | 50 | Console.WriteLine("OpenSim " + VersionInfo.Version + "\n"); |
47 | 51 | ||
48 | |||
49 | Console.Write("Performing compatibility checks... "); | 52 | Console.Write("Performing compatibility checks... "); |
50 | string supported = String.Empty; | 53 | string supported = String.Empty; |
51 | if (Util.IsEnvironmentSupported(ref supported)) | 54 | if (Util.IsEnvironmentSupported(ref supported)) |
@@ -75,11 +78,10 @@ namespace OpenSim | |||
75 | OpenSimMain sim = new OpenSimMain(configSource); | 78 | OpenSimMain sim = new OpenSimMain(configSource); |
76 | 79 | ||
77 | sim.StartUp(); | 80 | sim.StartUp(); |
78 | |||
79 | 81 | ||
80 | while (true) | 82 | while (true) |
81 | { | 83 | { |
82 | MainLog.Instance.MainLogPrompt(); | 84 | MainConsole.Instance.Prompt(); |
83 | } | 85 | } |
84 | } | 86 | } |
85 | 87 | ||
@@ -112,7 +114,7 @@ namespace OpenSim | |||
112 | 114 | ||
113 | // Do we not always want to see exception messages? | 115 | // Do we not always want to see exception messages? |
114 | // if (e.IsTerminating) | 116 | // if (e.IsTerminating) |
115 | MainLog.Instance.Error("APPLICATION", msg); | 117 | MainConsole.Instance.Error("[APPLICATION]: " + msg); |
116 | 118 | ||
117 | // Try to post errormessage to an URL | 119 | // Try to post errormessage to an URL |
118 | try | 120 | try |
@@ -131,6 +133,5 @@ namespace OpenSim | |||
131 | 133 | ||
132 | _IsHandlingException=false; | 134 | _IsHandlingException=false; |
133 | } | 135 | } |
134 | |||
135 | } | 136 | } |
136 | } | 137 | } |
diff --git a/OpenSim/Region/Application/OpenSimMain.cs b/OpenSim/Region/Application/OpenSimMain.cs index 36de410..074a7b5 100644 --- a/OpenSim/Region/Application/OpenSimMain.cs +++ b/OpenSim/Region/Application/OpenSimMain.cs | |||
@@ -55,6 +55,8 @@ namespace OpenSim | |||
55 | 55 | ||
56 | public class OpenSimMain : RegionApplicationBase, conscmd_callback | 56 | public class OpenSimMain : RegionApplicationBase, conscmd_callback |
57 | { | 57 | { |
58 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
59 | |||
58 | private const string DEFAULT_PRIM_BACKUP_FILENAME = "prim-backup.xml"; | 60 | private const string DEFAULT_PRIM_BACKUP_FILENAME = "prim-backup.xml"; |
59 | 61 | ||
60 | public string m_physicsEngine; | 62 | public string m_physicsEngine; |
@@ -77,7 +79,6 @@ namespace OpenSim | |||
77 | 79 | ||
78 | private bool m_verbose; | 80 | private bool m_verbose; |
79 | private bool m_physicalPrim; | 81 | private bool m_physicalPrim; |
80 | private readonly string m_logFilename = "region-console.log"; | ||
81 | private bool m_permissions = false; | 82 | private bool m_permissions = false; |
82 | 83 | ||
83 | private bool m_standaloneAuthenticate = false; | 84 | private bool m_standaloneAuthenticate = false; |
@@ -146,9 +147,7 @@ namespace OpenSim | |||
146 | { | 147 | { |
147 | // no default config files, so set default values, and save it | 148 | // no default config files, so set default values, and save it |
148 | m_config.Merge(DefaultConfig()); | 149 | m_config.Merge(DefaultConfig()); |
149 | |||
150 | m_config.Merge(configSource); | 150 | m_config.Merge(configSource); |
151 | |||
152 | m_config.Save(Application.iniFilePath); | 151 | m_config.Save(Application.iniFilePath); |
153 | } | 152 | } |
154 | } | 153 | } |
@@ -233,6 +232,8 @@ namespace OpenSim | |||
233 | m_sandbox = !startupConfig.GetBoolean("gridmode", false); | 232 | m_sandbox = !startupConfig.GetBoolean("gridmode", false); |
234 | m_physicsEngine = startupConfig.GetString("physics", "basicphysics"); | 233 | m_physicsEngine = startupConfig.GetString("physics", "basicphysics"); |
235 | m_meshEngineName = startupConfig.GetString("meshing", "ZeroMesher"); | 234 | m_meshEngineName = startupConfig.GetString("meshing", "ZeroMesher"); |
235 | |||
236 | // TODO: since log4net changes, verbose flag doesn't do anything | ||
236 | m_verbose = startupConfig.GetBoolean("verbose", true); | 237 | m_verbose = startupConfig.GetBoolean("verbose", true); |
237 | 238 | ||
238 | m_physicalPrim = startupConfig.GetBoolean("physical_prim", true); | 239 | m_physicalPrim = startupConfig.GetBoolean("physical_prim", true); |
@@ -280,7 +281,6 @@ namespace OpenSim | |||
280 | //if (!m_sandbox) | 281 | //if (!m_sandbox) |
281 | //m_SendChildAgentTaskData = false; | 282 | //m_SendChildAgentTaskData = false; |
282 | 283 | ||
283 | |||
284 | m_networkServersInfo.loadFromConfiguration(m_config); | 284 | m_networkServersInfo.loadFromConfiguration(m_config); |
285 | } | 285 | } |
286 | 286 | ||
@@ -293,16 +293,8 @@ namespace OpenSim | |||
293 | // Called from app startup (OpenSim.Application) | 293 | // Called from app startup (OpenSim.Application) |
294 | // | 294 | // |
295 | 295 | ||
296 | 296 | m_console = CreateConsole(); | |
297 | // Create log directory if it doesn't exist | 297 | MainConsole.Instance = m_console; |
298 | if (!Directory.Exists(Util.logDir())) | ||
299 | { | ||
300 | Directory.CreateDirectory(Util.logDir()); | ||
301 | } | ||
302 | |||
303 | // Create a log instance | ||
304 | m_log = CreateLog(); | ||
305 | MainLog.Instance = m_log; | ||
306 | 298 | ||
307 | StatsManager.StartCollectingSimExtraStats(); | 299 | StatsManager.StartCollectingSimExtraStats(); |
308 | 300 | ||
@@ -311,7 +303,6 @@ namespace OpenSim | |||
311 | // This base will call abstract Initialize | 303 | // This base will call abstract Initialize |
312 | base.StartUp(); | 304 | base.StartUp(); |
313 | 305 | ||
314 | |||
315 | // StandAlone mode? m_sandbox is determined by !startupConfig.GetBoolean("gridmode", false) | 306 | // StandAlone mode? m_sandbox is determined by !startupConfig.GetBoolean("gridmode", false) |
316 | if (m_sandbox) | 307 | if (m_sandbox) |
317 | { | 308 | { |
@@ -357,10 +348,10 @@ namespace OpenSim | |||
357 | } | 348 | } |
358 | 349 | ||
359 | // Create a ModuleLoader instance | 350 | // Create a ModuleLoader instance |
360 | m_moduleLoader = new ModuleLoader(m_log, m_config); | 351 | m_moduleLoader = new ModuleLoader(m_config); |
361 | 352 | ||
362 | ExtensionNodeList nodes = AddinManager.GetExtensionNodes("/OpenSim/Startup"); | 353 | ExtensionNodeList nodes = AddinManager.GetExtensionNodes("/OpenSim/Startup"); |
363 | m_log.Verbose("PLUGINS", "Loading {0} OpenSim application plugins", nodes.Count); | 354 | m_log.Info(String.Format("[PLUGINS]: Loading {0} OpenSim application plugins", nodes.Count)); |
364 | 355 | ||
365 | foreach (TypeExtensionNode node in nodes) | 356 | foreach (TypeExtensionNode node in nodes) |
366 | { | 357 | { |
@@ -383,7 +374,7 @@ namespace OpenSim | |||
383 | } | 374 | } |
384 | else | 375 | else |
385 | { | 376 | { |
386 | m_log.Verbose("STARTUP", "No startup command script specified. Moving on..."); | 377 | m_log.Info("[STARTUP]: No startup command script specified. Moving on..."); |
387 | } | 378 | } |
388 | 379 | ||
389 | // Start timer script (run a script every xx seconds) | 380 | // Start timer script (run a script every xx seconds) |
@@ -396,10 +387,7 @@ namespace OpenSim | |||
396 | } | 387 | } |
397 | 388 | ||
398 | // We are done with startup | 389 | // We are done with startup |
399 | m_log.Status("STARTUP", | 390 | m_log.Info("[STARTUP]: Startup complete, serving " + m_udpServers.Count.ToString() + " region(s)"); |
400 | "Startup complete, serving " + m_udpServers.Count.ToString() + " region(s)"); | ||
401 | |||
402 | // When we return now we will be in a wait for input command loop. | ||
403 | } | 391 | } |
404 | 392 | ||
405 | protected override void Initialize() | 393 | protected override void Initialize() |
@@ -433,8 +421,9 @@ namespace OpenSim | |||
433 | assetServer = sqlAssetServer; | 421 | assetServer = sqlAssetServer; |
434 | } | 422 | } |
435 | 423 | ||
436 | m_assetCache = new AssetCache(assetServer, m_log); | 424 | m_assetCache = new AssetCache(assetServer); |
437 | // m_assetCache = new assetCache("OpenSim.Region.GridInterfaces.Local.dll", m_networkServersInfo.AssetURL, m_networkServersInfo.AssetSendKey); | 425 | // m_assetCache = new assetCache("OpenSim.Region.GridInterfaces.Local.dll", m_networkServersInfo.AssetURL, m_networkServersInfo.AssetSendKey); |
426 | |||
438 | m_sceneManager.OnRestartSim += handleRestartRegion; | 427 | m_sceneManager.OnRestartSim += handleRestartRegion; |
439 | } | 428 | } |
440 | 429 | ||
@@ -448,23 +437,23 @@ namespace OpenSim | |||
448 | UDPServer udpServer; | 437 | UDPServer udpServer; |
449 | Scene scene = SetupScene(regionInfo, out udpServer, m_permissions); | 438 | Scene scene = SetupScene(regionInfo, out udpServer, m_permissions); |
450 | 439 | ||
451 | m_log.Verbose("MODULES", "Loading Region's modules"); | 440 | m_log.Info("[MODULES]: Loading Region's modules"); |
452 | 441 | ||
453 | m_moduleLoader.PickupModules(scene, "."); | 442 | m_moduleLoader.PickupModules(scene, "."); |
454 | //m_moduleLoader.PickupModules(scene, "ScriptEngines"); | 443 | //m_moduleLoader.PickupModules(scene, "ScriptEngines"); |
455 | //m_moduleLoader.LoadRegionModules(Path.Combine("ScriptEngines", m_scriptEngine), scene); | 444 | //m_moduleLoader.LoadRegionModules(Path.Combine("ScriptEngines", m_scriptEngine), scene); |
456 | m_log.Verbose("MODULES", "Loading scripting engine modules"); | 445 | m_log.Info("[MODULES]: Loading scripting engine modules"); |
457 | foreach (string module in m_scriptEngine.Split(',')) | 446 | foreach (string module in m_scriptEngine.Split(',')) |
458 | { | 447 | { |
459 | string mod = module.Trim(" \t".ToCharArray()); // Clean up name | 448 | string mod = module.Trim(" \t".ToCharArray()); // Clean up name |
460 | m_log.Verbose("MODULES", "Loading scripting engine: " + mod); | 449 | m_log.Info("[MODULES]: Loading scripting engine: " + mod); |
461 | try | 450 | try |
462 | { | 451 | { |
463 | m_moduleLoader.LoadRegionModules(Path.Combine("ScriptEngines", mod), scene); | 452 | m_moduleLoader.LoadRegionModules(Path.Combine("ScriptEngines", mod), scene); |
464 | } | 453 | } |
465 | catch (Exception ex) | 454 | catch (Exception ex) |
466 | { | 455 | { |
467 | m_log.Error("MODULES", "Failed to load script engine: " + ex.ToString()); | 456 | m_log.Error("[MODULES]: Failed to load script engine: " + ex.ToString()); |
468 | } | 457 | } |
469 | } | 458 | } |
470 | 459 | ||
@@ -503,8 +492,7 @@ namespace OpenSim | |||
503 | SceneCommunicationService sceneGridService = new SceneCommunicationService(m_commsManager); | 492 | SceneCommunicationService sceneGridService = new SceneCommunicationService(m_commsManager); |
504 | if (m_SendChildAgentTaskData) | 493 | if (m_SendChildAgentTaskData) |
505 | { | 494 | { |
506 | m_log.Error("WARNING", | 495 | m_log.Error("[WARNING]: Send Child Agent Task Updates is enabled. This is for testing only."); |
507 | "Send Child Agent Task Updates is enabled. This is for testing only."); | ||
508 | //Thread.Sleep(12000); | 496 | //Thread.Sleep(12000); |
509 | } | 497 | } |
510 | return | 498 | return |
@@ -516,7 +504,7 @@ namespace OpenSim | |||
516 | 504 | ||
517 | public void handleRestartRegion(RegionInfo whichRegion) | 505 | public void handleRestartRegion(RegionInfo whichRegion) |
518 | { | 506 | { |
519 | m_log.Error("MAIN", "Got restart signal from SceneManager"); | 507 | m_log.Error("[MAIN]: Got restart signal from SceneManager"); |
520 | // Shutting down the UDP server | 508 | // Shutting down the UDP server |
521 | bool foundUDPServer = false; | 509 | bool foundUDPServer = false; |
522 | int UDPServerElement = 0; | 510 | int UDPServerElement = 0; |
@@ -557,14 +545,9 @@ namespace OpenSim | |||
557 | //m_sceneManager.SendSimOnlineNotification(restartingRegion.RegionHandle); | 545 | //m_sceneManager.SendSimOnlineNotification(restartingRegion.RegionHandle); |
558 | } | 546 | } |
559 | 547 | ||
560 | protected override LogBase CreateLog() | 548 | protected override ConsoleBase CreateConsole() |
561 | { | 549 | { |
562 | if (!Directory.Exists(Util.logDir())) | 550 | return new ConsoleBase("Region", this); |
563 | { | ||
564 | Directory.CreateDirectory(Util.logDir()); | ||
565 | } | ||
566 | |||
567 | return new LogBase((Path.Combine(Util.logDir(), m_logFilename)), "Region", this, m_verbose); | ||
568 | } | 551 | } |
569 | 552 | ||
570 | # region Setup methods | 553 | # region Setup methods |
@@ -609,15 +592,15 @@ namespace OpenSim | |||
609 | RunCommandScript(m_shutdownCommandsFile); | 592 | RunCommandScript(m_shutdownCommandsFile); |
610 | } | 593 | } |
611 | 594 | ||
612 | m_log.Verbose("SHUTDOWN", "Closing all threads"); | 595 | m_log.Info("[SHUTDOWN]: Closing all threads"); |
613 | m_log.Verbose("SHUTDOWN", "Killing listener thread"); | 596 | m_log.Info("[SHUTDOWN]: Killing listener thread"); |
614 | m_log.Verbose("SHUTDOWN", "Killing clients"); | 597 | m_log.Info("[SHUTDOWN]: Killing clients"); |
615 | // TODO: implement this | 598 | // TODO: implement this |
616 | m_log.Verbose("SHUTDOWN", "Closing console and terminating"); | 599 | m_log.Info("[SHUTDOWN]: Closing console and terminating"); |
617 | 600 | ||
618 | m_sceneManager.Close(); | 601 | m_sceneManager.Close(); |
619 | 602 | ||
620 | m_log.Close(); | 603 | m_console.Close(); |
621 | Environment.Exit(0); | 604 | Environment.Exit(0); |
622 | } | 605 | } |
623 | 606 | ||
@@ -637,7 +620,7 @@ namespace OpenSim | |||
637 | /// <param name="fileName"></param> | 620 | /// <param name="fileName"></param> |
638 | private void RunCommandScript(string fileName) | 621 | private void RunCommandScript(string fileName) |
639 | { | 622 | { |
640 | m_log.Verbose("COMMANDFILE", "Running " + fileName); | 623 | m_log.Info("[COMMANDFILE]: Running " + fileName); |
641 | if (File.Exists(fileName)) | 624 | if (File.Exists(fileName)) |
642 | { | 625 | { |
643 | StreamReader readFile = File.OpenText(fileName); | 626 | StreamReader readFile = File.OpenText(fileName); |
@@ -646,14 +629,14 @@ namespace OpenSim | |||
646 | { | 629 | { |
647 | if (currentCommand != String.Empty) | 630 | if (currentCommand != String.Empty) |
648 | { | 631 | { |
649 | m_log.Verbose("COMMANDFILE", "Running '" + currentCommand + "'"); | 632 | m_log.Info("[COMMANDFILE]: Running '" + currentCommand + "'"); |
650 | m_log.MainLogRunCommand(currentCommand); | 633 | m_console.RunCommand(currentCommand); |
651 | } | 634 | } |
652 | } | 635 | } |
653 | } | 636 | } |
654 | else | 637 | else |
655 | { | 638 | { |
656 | m_log.Error("COMMANDFILE", "Command script missing. Can not run commands"); | 639 | m_log.Error("[COMMANDFILE]: Command script missing. Can not run commands"); |
657 | } | 640 | } |
658 | } | 641 | } |
659 | 642 | ||
@@ -673,7 +656,7 @@ namespace OpenSim | |||
673 | break; | 656 | break; |
674 | 657 | ||
675 | case "force-update": | 658 | case "force-update": |
676 | Console.WriteLine("Updating all clients"); | 659 | m_console.Notice("Updating all clients"); |
677 | m_sceneManager.ForceCurrentSceneClientUpdate(); | 660 | m_sceneManager.ForceCurrentSceneClientUpdate(); |
678 | break; | 661 | break; |
679 | 662 | ||
@@ -692,36 +675,36 @@ namespace OpenSim | |||
692 | break; | 675 | break; |
693 | 676 | ||
694 | case "help": | 677 | case "help": |
695 | m_log.Notice("alert - send alert to a designated user or all users."); | 678 | m_console.Notice("alert - send alert to a designated user or all users."); |
696 | m_log.Notice(" alert [First] [Last] [Message] - send an alert to a user. Case sensitive."); | 679 | m_console.Notice(" alert [First] [Last] [Message] - send an alert to a user. Case sensitive."); |
697 | m_log.Notice(" alert general [Message] - send an alert to all users."); | 680 | m_console.Notice(" alert general [Message] - send an alert to all users."); |
698 | m_log.Notice("backup - trigger a simulator backup"); | 681 | m_console.Notice("backup - trigger a simulator backup"); |
699 | m_log.Notice("create user - adds a new user"); | 682 | m_console.Notice("create user - adds a new user"); |
700 | m_log.Notice("change-region [name] - sets the region that many of these commands affect."); | 683 | m_console.Notice("change-region [name] - sets the region that many of these commands affect."); |
701 | m_log.Notice("command-script [filename] - Execute command in a file."); | 684 | m_console.Notice("command-script [filename] - Execute command in a file."); |
702 | m_log.Notice("debug - debugging commands"); | 685 | m_console.Notice("debug - debugging commands"); |
703 | m_log.Notice(" packet 0..255 - print incoming/outgoing packets (0=off)"); | 686 | m_console.Notice(" packet 0..255 - print incoming/outgoing packets (0=off)"); |
704 | m_log.Notice("edit-scale [prim name] [x] [y] [z] - resize given prim"); | 687 | m_console.Notice("edit-scale [prim name] [x] [y] [z] - resize given prim"); |
705 | m_log.Notice("export-map [filename] - save image of world map"); | 688 | m_console.Notice("export-map [filename] - save image of world map"); |
706 | m_log.Notice("force-update - force an update of prims in the scene"); | 689 | m_console.Notice("force-update - force an update of prims in the scene"); |
707 | m_log.Notice("load-xml [filename] - load prims from XML"); | 690 | m_console.Notice("load-xml [filename] - load prims from XML"); |
708 | m_log.Notice("load-xml2 [filename] - load prims from XML using version 2 format"); | 691 | m_console.Notice("load-xml2 [filename] - load prims from XML using version 2 format"); |
709 | m_log.Notice("permissions [true/false] - turn on/off permissions on the scene"); | 692 | m_console.Notice("permissions [true/false] - turn on/off permissions on the scene"); |
710 | m_log.Notice("quit - equivalent to shutdown."); | 693 | m_console.Notice("quit - equivalent to shutdown."); |
711 | m_log.Notice("restart - disconnects all clients and restarts the sims in the instance."); | 694 | m_console.Notice("restart - disconnects all clients and restarts the sims in the instance."); |
712 | m_log.Notice("remove-region [name] - remove a region"); | 695 | m_console.Notice("remove-region [name] - remove a region"); |
713 | m_log.Notice("save-xml [filename] - save prims to XML"); | 696 | m_console.Notice("save-xml [filename] - save prims to XML"); |
714 | m_log.Notice("save-xml2 [filename] - save prims to XML using version 2 format"); | 697 | m_console.Notice("save-xml2 [filename] - save prims to XML using version 2 format"); |
715 | m_log.Notice("script - manually trigger scripts? or script commands?"); | 698 | m_console.Notice("script - manually trigger scripts? or script commands?"); |
716 | m_log.Notice("set-time [x] - set the current scene time phase"); | 699 | m_console.Notice("set-time [x] - set the current scene time phase"); |
717 | m_log.Notice("show users - show info about connected users."); | 700 | m_console.Notice("show users - show info about connected users."); |
718 | m_log.Notice("show modules - shows info aboutloaded modules."); | 701 | m_console.Notice("show modules - shows info aboutloaded modules."); |
719 | m_log.Notice("show stats - statistical information for this server not displayed in the client"); | 702 | m_console.Notice("show stats - statistical information for this server not displayed in the client"); |
720 | m_log.Notice("shutdown - disconnect all clients and shutdown."); | 703 | m_console.Notice("shutdown - disconnect all clients and shutdown."); |
721 | m_log.Notice("config set section field value - set a config value"); | 704 | m_console.Notice("config set section field value - set a config value"); |
722 | m_log.Notice("config get section field - get a config value"); | 705 | m_console.Notice("config get section field - get a config value"); |
723 | m_log.Notice("config save - save OpenSim.ini"); | 706 | m_console.Notice("config save - save OpenSim.ini"); |
724 | m_log.Notice("terrain help - show help for terrain commands."); | 707 | m_console.Notice("terrain help - show help for terrain commands."); |
725 | break; | 708 | break; |
726 | 709 | ||
727 | case "save-xml": | 710 | case "save-xml": |
@@ -757,8 +740,8 @@ namespace OpenSim | |||
757 | { | 740 | { |
758 | loadOffset.Z = (float) Convert.ToDecimal(cmdparams[4]); | 741 | loadOffset.Z = (float) Convert.ToDecimal(cmdparams[4]); |
759 | } | 742 | } |
760 | m_log.Error("loadOffsets <X,Y,Z> = <" + loadOffset.X + "," + loadOffset.Y + "," + | 743 | m_console.Error("loadOffsets <X,Y,Z> = <" + loadOffset.X + "," + loadOffset.Y + "," + |
761 | loadOffset.Z + ">"); | 744 | loadOffset.Z + ">"); |
762 | } | 745 | } |
763 | } | 746 | } |
764 | m_sceneManager.LoadCurrentSceneFromXml(cmdparams[0], generateNewIDS, loadOffset); | 747 | m_sceneManager.LoadCurrentSceneFromXml(cmdparams[0], generateNewIDS, loadOffset); |
@@ -796,7 +779,7 @@ namespace OpenSim | |||
796 | 779 | ||
797 | if (!m_sceneManager.RunTerrainCmdOnCurrentScene(cmdparams, ref result)) | 780 | if (!m_sceneManager.RunTerrainCmdOnCurrentScene(cmdparams, ref result)) |
798 | { | 781 | { |
799 | m_log.Error(result); | 782 | m_console.Error(result); |
800 | } | 783 | } |
801 | break; | 784 | break; |
802 | 785 | ||
@@ -867,20 +850,18 @@ namespace OpenSim | |||
867 | 850 | ||
868 | if (!m_sceneManager.TrySetCurrentScene(regionName)) | 851 | if (!m_sceneManager.TrySetCurrentScene(regionName)) |
869 | { | 852 | { |
870 | m_log.Error("Couldn't set current region to: " + regionName); | 853 | m_console.Error("Couldn't set current region to: " + regionName); |
871 | } | 854 | } |
872 | } | 855 | } |
873 | 856 | ||
874 | if (m_sceneManager.CurrentScene == null) | 857 | if (m_sceneManager.CurrentScene == null) |
875 | { | 858 | { |
876 | m_log.Notice("CONSOLE", | 859 | m_console.Error("CONSOLE", "Currently at Root level. To change region please use 'change-region <regioname>'"); |
877 | "Currently at Root level. To change region please use 'change-region <regioname>'"); | ||
878 | } | 860 | } |
879 | else | 861 | else |
880 | { | 862 | { |
881 | m_log.Notice("CONSOLE", | 863 | m_console.Error("CONSOLE", "Current Region: " + m_sceneManager.CurrentScene.RegionInfo.RegionName + |
882 | "Current Region: " + m_sceneManager.CurrentScene.RegionInfo.RegionName + | 864 | ". To change region please use 'change-region <regioname>'"); |
883 | ". To change region please use 'change-region <regioname>'"); | ||
884 | } | 865 | } |
885 | 866 | ||
886 | break; | 867 | break; |
@@ -905,8 +886,8 @@ namespace OpenSim | |||
905 | case "set": | 886 | case "set": |
906 | if (cmdparams.Length < 4) | 887 | if (cmdparams.Length < 4) |
907 | { | 888 | { |
908 | m_log.Notice(n, "SYNTAX: " + n + " SET SECTION KEY VALUE"); | 889 | m_console.Error(n, "SYNTAX: " + n + " SET SECTION KEY VALUE"); |
909 | m_log.Notice(n, "EXAMPLE: " + n + " SET ScriptEngine.DotNetEngine NumberOfScriptThreads 5"); | 890 | m_console.Error(n, "EXAMPLE: " + n + " SET ScriptEngine.DotNetEngine NumberOfScriptThreads 5"); |
910 | } | 891 | } |
911 | else | 892 | else |
912 | { | 893 | { |
@@ -916,37 +897,35 @@ namespace OpenSim | |||
916 | string _value = String.Join(" ", cmdparams, 3, cmdparams.Length - 3); | 897 | string _value = String.Join(" ", cmdparams, 3, cmdparams.Length - 3); |
917 | c.Set(cmdparams[2], _value); | 898 | c.Set(cmdparams[2], _value); |
918 | m_config.Merge(c.ConfigSource); | 899 | m_config.Merge(c.ConfigSource); |
919 | 900 | ||
920 | m_log.Notice(n, | 901 | m_console.Error(n, n + " " + n + " " + cmdparams[1] + " " + cmdparams[2] + " " + |
921 | n + " " + n + " " + cmdparams[1] + " " + cmdparams[2] + " " + | 902 | _value); |
922 | _value); | ||
923 | } | 903 | } |
924 | break; | 904 | break; |
925 | case "get": | 905 | case "get": |
926 | if (cmdparams.Length < 3) | 906 | if (cmdparams.Length < 3) |
927 | { | 907 | { |
928 | m_log.Notice(n, "SYNTAX: " + n + " GET SECTION KEY"); | 908 | m_console.Error(n, "SYNTAX: " + n + " GET SECTION KEY"); |
929 | m_log.Notice(n, "EXAMPLE: " + n + " GET ScriptEngine.DotNetEngine NumberOfScriptThreads"); | 909 | m_console.Error(n, "EXAMPLE: " + n + " GET ScriptEngine.DotNetEngine NumberOfScriptThreads"); |
930 | } | 910 | } |
931 | else | 911 | else |
932 | { | 912 | { |
933 | IConfig c = DefaultConfig().Configs[cmdparams[1]]; | 913 | IConfig c = DefaultConfig().Configs[cmdparams[1]]; |
934 | if (c == null) | 914 | if (c == null) |
935 | { | 915 | { |
936 | m_log.Notice(n, "Section \"" + cmdparams[1] + "\" does not exist."); | 916 | m_console.Notice(n, "Section \"" + cmdparams[1] + "\" does not exist."); |
937 | break; | 917 | break; |
938 | } | 918 | } |
939 | else | 919 | else |
940 | { | 920 | { |
941 | m_log.Notice(n, | 921 | m_console.Notice(n + " GET " + cmdparams[1] + " " + cmdparams[2] + ": " + |
942 | n + " GET " + cmdparams[1] + " " + cmdparams[2] + ": " + | 922 | c.GetString(cmdparams[2])); |
943 | c.GetString(cmdparams[2])); | ||
944 | } | 923 | } |
945 | } | 924 | } |
946 | 925 | ||
947 | break; | 926 | break; |
948 | case "save": | 927 | case "save": |
949 | m_log.Notice(n, "Saving configuration file: " + Application.iniFilePath); | 928 | m_console.Notice("Saving configuration file: " + Application.iniFilePath); |
950 | m_config.Save(Application.iniFilePath); | 929 | m_config.Save(Application.iniFilePath); |
951 | break; | 930 | break; |
952 | } | 931 | } |
@@ -957,7 +936,7 @@ namespace OpenSim | |||
957 | * Temporarily disabled but it would be good to have this - needs to be levered | 936 | * Temporarily disabled but it would be good to have this - needs to be levered |
958 | * in to BaseOpenSimServer (which requires a RunCmd method restrcuture probably) | 937 | * in to BaseOpenSimServer (which requires a RunCmd method restrcuture probably) |
959 | default: | 938 | default: |
960 | m_log.Error("Unknown command"); | 939 | m_console.Error("Unknown command"); |
961 | break; | 940 | break; |
962 | */ | 941 | */ |
963 | } | 942 | } |
@@ -973,18 +952,18 @@ namespace OpenSim | |||
973 | int newDebug; | 952 | int newDebug; |
974 | if (int.TryParse(args[1], out newDebug)) | 953 | if (int.TryParse(args[1], out newDebug)) |
975 | { | 954 | { |
976 | m_sceneManager.SetDebugPacketOnCurrentScene(m_log, newDebug); | 955 | m_sceneManager.SetDebugPacketOnCurrentScene(newDebug); |
977 | } | 956 | } |
978 | else | 957 | else |
979 | { | 958 | { |
980 | m_log.Error("packet debug should be 0..2"); | 959 | m_console.Error("packet debug should be 0..2"); |
981 | } | 960 | } |
982 | Console.WriteLine("New packet debug: " + newDebug.ToString()); | 961 | m_console.Notice("New packet debug: " + newDebug.ToString()); |
983 | } | 962 | } |
984 | 963 | ||
985 | break; | 964 | break; |
986 | default: | 965 | default: |
987 | m_log.Error("Unknown debug"); | 966 | m_console.Error("Unknown debug"); |
988 | break; | 967 | break; |
989 | } | 968 | } |
990 | } | 969 | } |
@@ -997,7 +976,7 @@ namespace OpenSim | |||
997 | switch (ShowWhat) | 976 | switch (ShowWhat) |
998 | { | 977 | { |
999 | case "users": | 978 | case "users": |
1000 | m_log.Notice( | 979 | m_console.Notice( |
1001 | String.Format("{0,-16}{1,-16}{2,-37}{3,-16}{4,-22}{5,-16}", "Firstname", "Lastname", | 980 | String.Format("{0,-16}{1,-16}{2,-37}{3,-16}{4,-22}{5,-16}", "Firstname", "Lastname", |
1002 | "Agent ID", "Circuit", "IP", "Region")); | 981 | "Agent ID", "Circuit", "IP", "Region")); |
1003 | 982 | ||
@@ -1015,6 +994,7 @@ namespace OpenSim | |||
1015 | { | 994 | { |
1016 | regionName = regionInfo.RegionName; | 995 | regionName = regionInfo.RegionName; |
1017 | } | 996 | } |
997 | |||
1018 | for (int i = 0; i < m_udpServers.Count; i++) | 998 | for (int i = 0; i < m_udpServers.Count; i++) |
1019 | { | 999 | { |
1020 | if (m_udpServers[i].RegionHandle == presence.RegionHandle) | 1000 | if (m_udpServers[i].RegionHandle == presence.RegionHandle) |
@@ -1023,7 +1003,8 @@ namespace OpenSim | |||
1023 | m_udpServers[i].clientCircuits_reverse.TryGetValue(presence.ControllingClient.CircuitCode, out ep); | 1003 | m_udpServers[i].clientCircuits_reverse.TryGetValue(presence.ControllingClient.CircuitCode, out ep); |
1024 | } | 1004 | } |
1025 | } | 1005 | } |
1026 | m_log.Notice( | 1006 | |
1007 | m_console.Notice( | ||
1027 | String.Format("{0,-16}{1,-16}{2,-37}{3,-16}{4,-22}{5,-16}", | 1008 | String.Format("{0,-16}{1,-16}{2,-37}{3,-16}{4,-22}{5,-16}", |
1028 | presence.Firstname, | 1009 | presence.Firstname, |
1029 | presence.Lastname, | 1010 | presence.Lastname, |
@@ -1035,10 +1016,10 @@ namespace OpenSim | |||
1035 | 1016 | ||
1036 | break; | 1017 | break; |
1037 | case "modules": | 1018 | case "modules": |
1038 | m_log.Notice("The currently loaded shared modules are:"); | 1019 | m_console.Notice("The currently loaded shared modules are:"); |
1039 | foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules) | 1020 | foreach (IRegionModule module in m_moduleLoader.GetLoadedSharedModules) |
1040 | { | 1021 | { |
1041 | m_log.Notice("Shared Module: " + module.Name); | 1022 | m_console.Notice("Shared Module: " + module.Name); |
1042 | } | 1023 | } |
1043 | break; | 1024 | break; |
1044 | 1025 | ||
@@ -1046,21 +1027,21 @@ namespace OpenSim | |||
1046 | m_sceneManager.ForEachScene( | 1027 | m_sceneManager.ForEachScene( |
1047 | delegate(Scene scene) | 1028 | delegate(Scene scene) |
1048 | { | 1029 | { |
1049 | m_log.Notice("Region Name: " + scene.RegionInfo.RegionName + " , Region XLoc: " + | 1030 | m_console.Notice("Region Name: " + scene.RegionInfo.RegionName + " , Region XLoc: " + |
1050 | scene.RegionInfo.RegionLocX + " , Region YLoc: " + | 1031 | scene.RegionInfo.RegionLocX + " , Region YLoc: " + |
1051 | scene.RegionInfo.RegionLocY); | 1032 | scene.RegionInfo.RegionLocY); |
1052 | }); | 1033 | }); |
1053 | break; | 1034 | break; |
1054 | 1035 | ||
1055 | case "stats": | 1036 | case "stats": |
1056 | if (StatsManager.SimExtraStats != null) | 1037 | if (StatsManager.SimExtraStats != null) |
1057 | { | 1038 | { |
1058 | m_log.Notice( | 1039 | m_console.Notice( |
1059 | "STATS", Environment.NewLine + StatsManager.SimExtraStats.Report()); | 1040 | "STATS", Environment.NewLine + StatsManager.SimExtraStats.Report()); |
1060 | } | 1041 | } |
1061 | else | 1042 | else |
1062 | { | 1043 | { |
1063 | m_log.Notice("STATS", "Extra sim statistics collection has not been enabled"); | 1044 | m_console.Notice("Extra sim statistics collection has not been enabled"); |
1064 | } | 1045 | } |
1065 | break; | 1046 | break; |
1066 | } | 1047 | } |
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs index 5fdb9b3..10bf0d1 100644 --- a/OpenSim/Region/ClientStack/ClientView.cs +++ b/OpenSim/Region/ClientStack/ClientView.cs | |||
@@ -51,6 +51,8 @@ namespace OpenSim.Region.ClientStack | |||
51 | /// </summary> | 51 | /// </summary> |
52 | public class ClientView : IClientAPI | 52 | public class ClientView : IClientAPI |
53 | { | 53 | { |
54 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
55 | |||
54 | /* static variables */ | 56 | /* static variables */ |
55 | public static TerrainManager TerrainManager; | 57 | public static TerrainManager TerrainManager; |
56 | 58 | ||
@@ -196,7 +198,7 @@ namespace OpenSim.Region.ClientStack | |||
196 | // m_inventoryCache = inventoryCache; | 198 | // m_inventoryCache = inventoryCache; |
197 | m_authenticateSessionsHandler = authenSessions; | 199 | m_authenticateSessionsHandler = authenSessions; |
198 | 200 | ||
199 | MainLog.Instance.Verbose("CLIENT", "Started up new client thread to handle incoming request"); | 201 | m_log.Info("[CLIENT]: Started up new client thread to handle incoming request"); |
200 | 202 | ||
201 | m_agentId = agentId; | 203 | m_agentId = agentId; |
202 | m_sessionId = sessionId; | 204 | m_sessionId = sessionId; |
@@ -260,7 +262,7 @@ namespace OpenSim.Region.ClientStack | |||
260 | public void Close(bool ShutdownCircult) | 262 | public void Close(bool ShutdownCircult) |
261 | { | 263 | { |
262 | // Pull Client out of Region | 264 | // Pull Client out of Region |
263 | MainLog.Instance.Verbose("CLIENT", "Close has been called"); | 265 | m_log.Info("[CLIENT]: Close has been called"); |
264 | 266 | ||
265 | //raiseevent on the packet server to Shutdown the circuit | 267 | //raiseevent on the packet server to Shutdown the circuit |
266 | if (ShutdownCircult) | 268 | if (ShutdownCircult) |
@@ -286,7 +288,7 @@ namespace OpenSim.Region.ClientStack | |||
286 | 288 | ||
287 | public void Stop() | 289 | public void Stop() |
288 | { | 290 | { |
289 | MainLog.Instance.Verbose("BUG", "Stop called, please find out where and remove it"); | 291 | m_log.Info("[BUG]: Stop called, please find out where and remove it"); |
290 | } | 292 | } |
291 | 293 | ||
292 | #endregion | 294 | #endregion |
@@ -378,7 +380,7 @@ namespace OpenSim.Region.ClientStack | |||
378 | 380 | ||
379 | protected virtual void ClientLoop() | 381 | protected virtual void ClientLoop() |
380 | { | 382 | { |
381 | MainLog.Instance.Verbose("CLIENT", "Entered loop"); | 383 | m_log.Info("[CLIENT]: Entered loop"); |
382 | while (true) | 384 | while (true) |
383 | { | 385 | { |
384 | QueItem nextPacket = m_packetQueue.Dequeue(); | 386 | QueItem nextPacket = m_packetQueue.Dequeue(); |
@@ -445,7 +447,7 @@ namespace OpenSim.Region.ClientStack | |||
445 | m_clientPingTimer.Elapsed += new ElapsedEventHandler(CheckClientConnectivity); | 447 | m_clientPingTimer.Elapsed += new ElapsedEventHandler(CheckClientConnectivity); |
446 | m_clientPingTimer.Enabled = true; | 448 | m_clientPingTimer.Enabled = true; |
447 | 449 | ||
448 | MainLog.Instance.Verbose("CLIENT", "Adding viewer agent to scene"); | 450 | m_log.Info("[CLIENT]: Adding viewer agent to scene"); |
449 | m_scene.AddNewClient(this, true); | 451 | m_scene.AddNewClient(this, true); |
450 | } | 452 | } |
451 | 453 | ||
@@ -458,13 +460,13 @@ namespace OpenSim.Region.ClientStack | |||
458 | if (!sessionInfo.Authorised) | 460 | if (!sessionInfo.Authorised) |
459 | { | 461 | { |
460 | //session/circuit not authorised | 462 | //session/circuit not authorised |
461 | MainLog.Instance.Notice("CLIENT", "New user request denied to " + m_userEndPoint.ToString()); | 463 | m_log.Info("[CLIENT]: New user request denied to " + m_userEndPoint.ToString()); |
462 | m_packetQueue.Close(); | 464 | m_packetQueue.Close(); |
463 | m_clientThread.Abort(); | 465 | m_clientThread.Abort(); |
464 | } | 466 | } |
465 | else | 467 | else |
466 | { | 468 | { |
467 | MainLog.Instance.Notice("CLIENT", "Got authenticated connection from " + m_userEndPoint.ToString()); | 469 | m_log.Info("[CLIENT]: Got authenticated connection from " + m_userEndPoint.ToString()); |
468 | //session is authorised | 470 | //session is authorised |
469 | m_firstName = sessionInfo.LoginInfo.First; | 471 | m_firstName = sessionInfo.LoginInfo.First; |
470 | m_lastName = sessionInfo.LoginInfo.Last; | 472 | m_lastName = sessionInfo.LoginInfo.Last; |
@@ -731,7 +733,7 @@ namespace OpenSim.Region.ClientStack | |||
731 | } | 733 | } |
732 | catch (Exception e) | 734 | catch (Exception e) |
733 | { | 735 | { |
734 | MainLog.Instance.Warn("client", | 736 | m_log.Warn("[client]: " + |
735 | "ClientView.API.cs: SendLayerData() - Failed with exception " + e.ToString()); | 737 | "ClientView.API.cs: SendLayerData() - Failed with exception " + e.ToString()); |
736 | } | 738 | } |
737 | } | 739 | } |
@@ -758,7 +760,7 @@ namespace OpenSim.Region.ClientStack | |||
758 | } | 760 | } |
759 | catch (Exception e) | 761 | catch (Exception e) |
760 | { | 762 | { |
761 | MainLog.Instance.Warn("client", | 763 | m_log.Warn("[client]: " + |
762 | "ClientView.API.cs: SendLayerData() - Failed with exception " + e.ToString()); | 764 | "ClientView.API.cs: SendLayerData() - Failed with exception " + e.ToString()); |
763 | } | 765 | } |
764 | } | 766 | } |
@@ -2102,7 +2104,7 @@ namespace OpenSim.Region.ClientStack | |||
2102 | 2104 | ||
2103 | protected virtual bool Logout(IClientAPI client, Packet packet) | 2105 | protected virtual bool Logout(IClientAPI client, Packet packet) |
2104 | { | 2106 | { |
2105 | MainLog.Instance.Verbose("CLIENT", "Got a logout request"); | 2107 | m_log.Info("[CLIENT]: Got a logout request"); |
2106 | 2108 | ||
2107 | if (OnLogout != null) | 2109 | if (OnLogout != null) |
2108 | { | 2110 | { |
@@ -2431,10 +2433,10 @@ namespace OpenSim.Region.ClientStack | |||
2431 | } | 2433 | } |
2432 | catch (Exception e) | 2434 | catch (Exception e) |
2433 | { | 2435 | { |
2434 | MainLog.Instance.Warn("client", | 2436 | m_log.Warn("[client]: " + |
2435 | "ClientView.m_packetQueue.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection " + | 2437 | "ClientView.m_packetQueue.cs:ProcessOutPacket() - WARNING: Socket exception occurred on connection " + |
2436 | m_userEndPoint.ToString() + " - killing thread"); | 2438 | m_userEndPoint.ToString() + " - killing thread"); |
2437 | MainLog.Instance.Error(e.ToString()); | 2439 | m_log.Error(e.ToString()); |
2438 | Close(true); | 2440 | Close(true); |
2439 | } | 2441 | } |
2440 | } | 2442 | } |
@@ -2545,7 +2547,7 @@ namespace OpenSim.Region.ClientStack | |||
2545 | { | 2547 | { |
2546 | if ((now - packet.TickCount > RESEND_TIMEOUT) && (!packet.Header.Resent)) | 2548 | if ((now - packet.TickCount > RESEND_TIMEOUT) && (!packet.Header.Resent)) |
2547 | { | 2549 | { |
2548 | MainLog.Instance.Verbose("NETWORK", "Resending " + packet.Type.ToString() + " packet, " + | 2550 | m_log.Info("[NETWORK]: Resending " + packet.Type.ToString() + " packet, " + |
2549 | (now - packet.TickCount) + "ms have passed"); | 2551 | (now - packet.TickCount) + "ms have passed"); |
2550 | 2552 | ||
2551 | packet.Header.Resent = true; | 2553 | packet.Header.Resent = true; |
@@ -2564,11 +2566,11 @@ namespace OpenSim.Region.ClientStack | |||
2564 | if (m_pendingAcks.Count > 250) | 2566 | if (m_pendingAcks.Count > 250) |
2565 | { | 2567 | { |
2566 | // FIXME: Handle the odd case where we have too many pending ACKs queued up | 2568 | // FIXME: Handle the odd case where we have too many pending ACKs queued up |
2567 | MainLog.Instance.Verbose("NETWORK", "Too many ACKs queued up!"); | 2569 | m_log.Info("[NETWORK]: Too many ACKs queued up!"); |
2568 | return; | 2570 | return; |
2569 | } | 2571 | } |
2570 | 2572 | ||
2571 | //MainLog.Instance.Verbose("NETWORK", "Sending PacketAck"); | 2573 | //m_log.Info("[NETWORK]: Sending PacketAck"); |
2572 | 2574 | ||
2573 | int i = 0; | 2575 | int i = 0; |
2574 | PacketAckPacket acks = (PacketAckPacket)PacketPool.Instance.GetPacket(PacketType.PacketAck); | 2576 | PacketAckPacket acks = (PacketAckPacket)PacketPool.Instance.GetPacket(PacketType.PacketAck); |
@@ -2754,7 +2756,7 @@ namespace OpenSim.Region.ClientStack | |||
2754 | //rezPacket.RezData.RemoveItem; | 2756 | //rezPacket.RezData.RemoveItem; |
2755 | //rezPacket.RezData.RezSelected; | 2757 | //rezPacket.RezData.RezSelected; |
2756 | //rezPacket.RezData.FromTaskID; | 2758 | //rezPacket.RezData.FromTaskID; |
2757 | //MainLog.Instance.Verbose("REZData", rezPacket.ToString()); | 2759 | //m_log.Info("[REZData]: " + rezPacket.ToString()); |
2758 | OnRezObject(this, rezPacket.InventoryData.ItemID, rezPacket.RezData.RayEnd, | 2760 | OnRezObject(this, rezPacket.InventoryData.ItemID, rezPacket.RezData.RayEnd, |
2759 | rezPacket.RezData.RayStart, rezPacket.RezData.RayTargetID, | 2761 | rezPacket.RezData.RayStart, rezPacket.RezData.RayTargetID, |
2760 | rezPacket.RezData.BypassRaycast, rezPacket.RezData.RayEndIsIntersection, | 2762 | rezPacket.RezData.BypassRaycast, rezPacket.RezData.RayEndIsIntersection, |
@@ -2772,7 +2774,7 @@ namespace OpenSim.Region.ClientStack | |||
2772 | break; | 2774 | break; |
2773 | case PacketType.ModifyLand: | 2775 | case PacketType.ModifyLand: |
2774 | ModifyLandPacket modify = (ModifyLandPacket)Pack; | 2776 | ModifyLandPacket modify = (ModifyLandPacket)Pack; |
2775 | //MainLog.Instance.Verbose("LAND", "LAND:" + modify.ToString()); | 2777 | //m_log.Info("[LAND]: LAND:" + modify.ToString()); |
2776 | if (modify.ParcelData.Length > 0) | 2778 | if (modify.ParcelData.Length > 0) |
2777 | { | 2779 | { |
2778 | if (OnModifyTerrain != null) | 2780 | if (OnModifyTerrain != null) |
@@ -2941,7 +2943,7 @@ namespace OpenSim.Region.ClientStack | |||
2941 | { | 2943 | { |
2942 | ObjectAddPacket addPacket = (ObjectAddPacket)Pack; | 2944 | ObjectAddPacket addPacket = (ObjectAddPacket)Pack; |
2943 | PrimitiveBaseShape shape = GetShapeFromAddPacket(addPacket); | 2945 | PrimitiveBaseShape shape = GetShapeFromAddPacket(addPacket); |
2944 | // MainLog.Instance.Verbose("REZData", addPacket.ToString()); | 2946 | // m_log.Info("[REZData]: " + addPacket.ToString()); |
2945 | //BypassRaycast: 1 | 2947 | //BypassRaycast: 1 |
2946 | //RayStart: <69.79469, 158.2652, 98.40343> | 2948 | //RayStart: <69.79469, 158.2652, 98.40343> |
2947 | //RayEnd: <61.97724, 141.995, 92.58341> | 2949 | //RayEnd: <61.97724, 141.995, 92.58341> |
@@ -3068,7 +3070,7 @@ namespace OpenSim.Region.ClientStack | |||
3068 | } | 3070 | } |
3069 | break; | 3071 | break; |
3070 | case PacketType.ObjectPermissions: | 3072 | case PacketType.ObjectPermissions: |
3071 | MainLog.Instance.Warn("CLIENT", "unhandled packet " + PacketType.ObjectPermissions.ToString()); | 3073 | m_log.Warn("[CLIENT]: unhandled packet " + PacketType.ObjectPermissions.ToString()); |
3072 | ObjectPermissionsPacket newobjPerms = (ObjectPermissionsPacket)Pack; | 3074 | ObjectPermissionsPacket newobjPerms = (ObjectPermissionsPacket)Pack; |
3073 | 3075 | ||
3074 | List<ObjectPermissionsPacket.ObjectDataBlock> permChanges = | 3076 | List<ObjectPermissionsPacket.ObjectDataBlock> permChanges = |
@@ -3344,7 +3346,7 @@ namespace OpenSim.Region.ClientStack | |||
3344 | } | 3346 | } |
3345 | break; | 3347 | break; |
3346 | case PacketType.MoveTaskInventory: | 3348 | case PacketType.MoveTaskInventory: |
3347 | MainLog.Instance.Warn("CLIENT", "unhandled MoveTaskInventory packet"); | 3349 | m_log.Warn("[CLIENT]: unhandled MoveTaskInventory packet"); |
3348 | break; | 3350 | break; |
3349 | case PacketType.RezScript: | 3351 | case PacketType.RezScript: |
3350 | //Console.WriteLine(Pack.ToString()); | 3352 | //Console.WriteLine(Pack.ToString()); |
@@ -3594,7 +3596,7 @@ namespace OpenSim.Region.ClientStack | |||
3594 | 3596 | ||
3595 | break; | 3597 | break; |
3596 | case PacketType.GodKickUser: | 3598 | case PacketType.GodKickUser: |
3597 | MainLog.Instance.Warn("CLIENT", "unhandled GodKickUser packet"); | 3599 | m_log.Warn("[CLIENT]: unhandled GodKickUser packet"); |
3598 | 3600 | ||
3599 | GodKickUserPacket gkupack = (GodKickUserPacket)Pack; | 3601 | GodKickUserPacket gkupack = (GodKickUserPacket)Pack; |
3600 | 3602 | ||
@@ -3624,88 +3626,88 @@ namespace OpenSim.Region.ClientStack | |||
3624 | // Send the client the ping response back | 3626 | // Send the client the ping response back |
3625 | // Pass the same PingID in the matching packet | 3627 | // Pass the same PingID in the matching packet |
3626 | // Handled In the packet processing | 3628 | // Handled In the packet processing |
3627 | //MainLog.Instance.Debug("CLIENT", "possibly unhandled StartPingCheck packet"); | 3629 | //m_log.Debug("[CLIENT]: possibly unhandled StartPingCheck packet"); |
3628 | break; | 3630 | break; |
3629 | case PacketType.CompletePingCheck: | 3631 | case PacketType.CompletePingCheck: |
3630 | // TODO: Perhaps this should be processed on the Sim to determine whether or not to drop a dead client | 3632 | // TODO: Perhaps this should be processed on the Sim to determine whether or not to drop a dead client |
3631 | //MainLog.Instance.Warn("CLIENT", "unhandled CompletePingCheck packet"); | 3633 | //m_log.Warn("[CLIENT]: unhandled CompletePingCheck packet"); |
3632 | break; | 3634 | break; |
3633 | case PacketType.ObjectScale: | 3635 | case PacketType.ObjectScale: |
3634 | // TODO: handle this packet | 3636 | // TODO: handle this packet |
3635 | MainLog.Instance.Warn("CLIENT", "unhandled ObjectScale packet"); | 3637 | m_log.Warn("[CLIENT]: unhandled ObjectScale packet"); |
3636 | break; | 3638 | break; |
3637 | case PacketType.ViewerStats: | 3639 | case PacketType.ViewerStats: |
3638 | // TODO: handle this packet | 3640 | // TODO: handle this packet |
3639 | MainLog.Instance.Warn("CLIENT", "unhandled ViewerStats packet"); | 3641 | m_log.Warn("[CLIENT]: unhandled ViewerStats packet"); |
3640 | break; | 3642 | break; |
3641 | 3643 | ||
3642 | case PacketType.CreateGroupRequest: | 3644 | case PacketType.CreateGroupRequest: |
3643 | // TODO: handle this packet | 3645 | // TODO: handle this packet |
3644 | MainLog.Instance.Warn("CLIENT", "unhandled CreateGroupRequest packet"); | 3646 | m_log.Warn("[CLIENT]: unhandled CreateGroupRequest packet"); |
3645 | break; | 3647 | break; |
3646 | case PacketType.GenericMessage: | 3648 | case PacketType.GenericMessage: |
3647 | // TODO: handle this packet | 3649 | // TODO: handle this packet |
3648 | MainLog.Instance.Warn("CLIENT", "unhandled GenericMessage packet"); | 3650 | m_log.Warn("[CLIENT]: unhandled GenericMessage packet"); |
3649 | break; | 3651 | break; |
3650 | case PacketType.MapItemRequest: | 3652 | case PacketType.MapItemRequest: |
3651 | // TODO: handle this packet | 3653 | // TODO: handle this packet |
3652 | MainLog.Instance.Warn("CLIENT", "unhandled MapItemRequest packet"); | 3654 | m_log.Warn("[CLIENT]: unhandled MapItemRequest packet"); |
3653 | break; | 3655 | break; |
3654 | case PacketType.AgentResume: | 3656 | case PacketType.AgentResume: |
3655 | // TODO: handle this packet | 3657 | // TODO: handle this packet |
3656 | MainLog.Instance.Warn("CLIENT", "unhandled AgentResume packet"); | 3658 | m_log.Warn("[CLIENT]: unhandled AgentResume packet"); |
3657 | break; | 3659 | break; |
3658 | case PacketType.AgentPause: | 3660 | case PacketType.AgentPause: |
3659 | // TODO: handle this packet | 3661 | // TODO: handle this packet |
3660 | MainLog.Instance.Warn("CLIENT", "unhandled AgentPause packet"); | 3662 | m_log.Warn("[CLIENT]: unhandled AgentPause packet"); |
3661 | break; | 3663 | break; |
3662 | case PacketType.TransferAbort: | 3664 | case PacketType.TransferAbort: |
3663 | // TODO: handle this packet | 3665 | // TODO: handle this packet |
3664 | MainLog.Instance.Warn("CLIENT", "unhandled TransferAbort packet"); | 3666 | m_log.Warn("[CLIENT]: unhandled TransferAbort packet"); |
3665 | break; | 3667 | break; |
3666 | case PacketType.MuteListRequest: | 3668 | case PacketType.MuteListRequest: |
3667 | // TODO: handle this packet | 3669 | // TODO: handle this packet |
3668 | MainLog.Instance.Warn("CLIENT", "unhandled MuteListRequest packet"); | 3670 | m_log.Warn("[CLIENT]: unhandled MuteListRequest packet"); |
3669 | break; | 3671 | break; |
3670 | case PacketType.AgentDataUpdateRequest: | 3672 | case PacketType.AgentDataUpdateRequest: |
3671 | // TODO: handle this packet | 3673 | // TODO: handle this packet |
3672 | MainLog.Instance.Warn("CLIENT", "unhandled AgentDataUpdateRequest packet"); | 3674 | m_log.Warn("[CLIENT]: unhandled AgentDataUpdateRequest packet"); |
3673 | break; | 3675 | break; |
3674 | 3676 | ||
3675 | case PacketType.ParcelDwellRequest: | 3677 | case PacketType.ParcelDwellRequest: |
3676 | // TODO: handle this packet | 3678 | // TODO: handle this packet |
3677 | MainLog.Instance.Warn("CLIENT", "unhandled ParcelDwellRequest packet"); | 3679 | m_log.Warn("[CLIENT]: unhandled ParcelDwellRequest packet"); |
3678 | break; | 3680 | break; |
3679 | case PacketType.UseCircuitCode: | 3681 | case PacketType.UseCircuitCode: |
3680 | // TODO: handle this packet | 3682 | // TODO: handle this packet |
3681 | //MainLog.Instance.Warn("CLIENT", "unhandled UseCircuitCode packet"); | 3683 | //m_log.Warn("[CLIENT]: unhandled UseCircuitCode packet"); |
3682 | break; | 3684 | break; |
3683 | case PacketType.EconomyDataRequest: | 3685 | case PacketType.EconomyDataRequest: |
3684 | // TODO: handle this packet | 3686 | // TODO: handle this packet |
3685 | MainLog.Instance.Warn("CLIENT", "unhandled EconomyDataRequest packet"); | 3687 | m_log.Warn("[CLIENT]: unhandled EconomyDataRequest packet"); |
3686 | break; | 3688 | break; |
3687 | case PacketType.AgentHeightWidth: | 3689 | case PacketType.AgentHeightWidth: |
3688 | // TODO: handle this packet | 3690 | // TODO: handle this packet |
3689 | MainLog.Instance.Warn("CLIENT", "unhandled AgentHeightWidth packet"); | 3691 | m_log.Warn("[CLIENT]: unhandled AgentHeightWidth packet"); |
3690 | break; | 3692 | break; |
3691 | case PacketType.ObjectSpinStop: | 3693 | case PacketType.ObjectSpinStop: |
3692 | // TODO: handle this packet | 3694 | // TODO: handle this packet |
3693 | MainLog.Instance.Warn("CLIENT", "unhandled ObjectSpinStop packet"); | 3695 | m_log.Warn("[CLIENT]: unhandled ObjectSpinStop packet"); |
3694 | break; | 3696 | break; |
3695 | case PacketType.SoundTrigger: | 3697 | case PacketType.SoundTrigger: |
3696 | // TODO: handle this packet | 3698 | // TODO: handle this packet |
3697 | MainLog.Instance.Warn("CLIENT", "unhandled SoundTrigger packet"); | 3699 | m_log.Warn("[CLIENT]: unhandled SoundTrigger packet"); |
3698 | break; | 3700 | break; |
3699 | case PacketType.UserInfoRequest: | 3701 | case PacketType.UserInfoRequest: |
3700 | // TODO: handle this packet | 3702 | // TODO: handle this packet |
3701 | MainLog.Instance.Warn("CLIENT", "unhandled UserInfoRequest packet"); | 3703 | m_log.Warn("[CLIENT]: unhandled UserInfoRequest packet"); |
3702 | break; | 3704 | break; |
3703 | case PacketType.InventoryDescendents: | 3705 | case PacketType.InventoryDescendents: |
3704 | // TODO: handle this packet | 3706 | // TODO: handle this packet |
3705 | MainLog.Instance.Warn("CLIENT", "unhandled InventoryDescent packet"); | 3707 | m_log.Warn("[CLIENT]: unhandled InventoryDescent packet"); |
3706 | break; | 3708 | break; |
3707 | default: | 3709 | default: |
3708 | MainLog.Instance.Warn("CLIENT", "unhandled packet " + Pack.ToString()); | 3710 | m_log.Warn("[CLIENT]: unhandled packet " + Pack.ToString()); |
3709 | break; | 3711 | break; |
3710 | 3712 | ||
3711 | #endregion | 3713 | #endregion |
diff --git a/OpenSim/Region/ClientStack/PacketQueue.cs b/OpenSim/Region/ClientStack/PacketQueue.cs index 685f91b..8b2a93a 100644 --- a/OpenSim/Region/ClientStack/PacketQueue.cs +++ b/OpenSim/Region/ClientStack/PacketQueue.cs | |||
@@ -37,6 +37,8 @@ namespace OpenSim.Region.ClientStack | |||
37 | { | 37 | { |
38 | public class PacketQueue | 38 | public class PacketQueue |
39 | { | 39 | { |
40 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | |||
40 | private bool m_enabled = true; | 42 | private bool m_enabled = true; |
41 | 43 | ||
42 | private BlockingQueue<QueItem> SendQueue; | 44 | private BlockingQueue<QueItem> SendQueue; |
@@ -204,7 +206,7 @@ namespace OpenSim.Region.ClientStack | |||
204 | SendQueue.Enqueue(AssetOutgoingPacketQueue.Dequeue()); | 206 | SendQueue.Enqueue(AssetOutgoingPacketQueue.Dequeue()); |
205 | } | 207 | } |
206 | } | 208 | } |
207 | // MainLog.Instance.Verbose("THROTTLE", "Processed " + throttleLoops + " packets"); | 209 | // m_log.Info("[THROTTLE]: Processed " + throttleLoops + " packets"); |
208 | } | 210 | } |
209 | } | 211 | } |
210 | 212 | ||
@@ -253,7 +255,7 @@ namespace OpenSim.Region.ClientStack | |||
253 | lock (this) | 255 | lock (this) |
254 | { | 256 | { |
255 | ResetCounters(); | 257 | ResetCounters(); |
256 | // MainLog.Instance.Verbose("THROTTLE", "Entering Throttle"); | 258 | // m_log.Info("[THROTTLE]: Entering Throttle"); |
257 | while (TotalThrottle.UnderLimit() && PacketsWaiting() && | 259 | while (TotalThrottle.UnderLimit() && PacketsWaiting() && |
258 | (throttleLoops <= MaxThrottleLoops)) | 260 | (throttleLoops <= MaxThrottleLoops)) |
259 | { | 261 | { |
@@ -316,7 +318,7 @@ namespace OpenSim.Region.ClientStack | |||
316 | AssetThrottle.Add(qpack.Packet.ToBytes().Length); | 318 | AssetThrottle.Add(qpack.Packet.ToBytes().Length); |
317 | } | 319 | } |
318 | } | 320 | } |
319 | // MainLog.Instance.Verbose("THROTTLE", "Processed " + throttleLoops + " packets"); | 321 | // m_log.Info("[THROTTLE]: Processed " + throttleLoops + " packets"); |
320 | } | 322 | } |
321 | } | 323 | } |
322 | 324 | ||
@@ -426,7 +428,7 @@ namespace OpenSim.Region.ClientStack | |||
426 | 428 | ||
427 | tall = tResend + tLand + tWind + tCloud + tTask + tTexture + tAsset; | 429 | tall = tResend + tLand + tWind + tCloud + tTask + tTexture + tAsset; |
428 | /* | 430 | /* |
429 | MainLog.Instance.Verbose("CLIENT", "Client AgentThrottle - Got throttle:resendbytes=" + tResend + | 431 | m_log.Info("[CLIENT]: Client AgentThrottle - Got throttle:resendbytes=" + tResend + |
430 | " landbytes=" + tLand + | 432 | " landbytes=" + tLand + |
431 | " windbytes=" + tWind + | 433 | " windbytes=" + tWind + |
432 | " cloudbytes=" + tCloud + | 434 | " cloudbytes=" + tCloud + |
diff --git a/OpenSim/Region/ClientStack/RegionApplicationBase.cs b/OpenSim/Region/ClientStack/RegionApplicationBase.cs index 72917d1..8a042b1 100644 --- a/OpenSim/Region/ClientStack/RegionApplicationBase.cs +++ b/OpenSim/Region/ClientStack/RegionApplicationBase.cs | |||
@@ -42,6 +42,8 @@ namespace OpenSim.Region.ClientStack | |||
42 | { | 42 | { |
43 | public abstract class RegionApplicationBase : BaseOpenSimServer | 43 | public abstract class RegionApplicationBase : BaseOpenSimServer |
44 | { | 44 | { |
45 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | |||
45 | protected AssetCache m_assetCache; | 47 | protected AssetCache m_assetCache; |
46 | protected Dictionary<EndPoint, uint> m_clientCircuits = new Dictionary<EndPoint, uint>(); | 48 | protected Dictionary<EndPoint, uint> m_clientCircuits = new Dictionary<EndPoint, uint>(); |
47 | protected NetworkServersInfo m_networkServersInfo; | 49 | protected NetworkServersInfo m_networkServersInfo; |
@@ -75,19 +77,20 @@ namespace OpenSim.Region.ClientStack | |||
75 | 77 | ||
76 | m_httpServer = new BaseHttpServer(m_httpServerPort); | 78 | m_httpServer = new BaseHttpServer(m_httpServerPort); |
77 | 79 | ||
78 | m_log.Status("REGION", "Starting HTTP server"); | 80 | m_log.Info("[REGION]: Starting HTTP server"); |
81 | |||
79 | m_httpServer.Start(); | 82 | m_httpServer.Start(); |
80 | } | 83 | } |
81 | 84 | ||
82 | protected abstract void Initialize(); | 85 | protected abstract void Initialize(); |
83 | 86 | ||
84 | protected void StartLog() | 87 | protected void StartConsole() |
85 | { | 88 | { |
86 | m_log = CreateLog(); | 89 | m_console = CreateConsole(); |
87 | MainLog.Instance = m_log; | 90 | MainConsole.Instance = m_console; |
88 | } | 91 | } |
89 | 92 | ||
90 | protected abstract LogBase CreateLog(); | 93 | protected abstract ConsoleBase CreateConsole(); |
91 | protected abstract PhysicsScene GetPhysicsScene(); | 94 | protected abstract PhysicsScene GetPhysicsScene(); |
92 | protected abstract StorageManager CreateStorageManager(string connectionstring); | 95 | protected abstract StorageManager CreateStorageManager(string connectionstring); |
93 | 96 | ||
@@ -107,7 +110,7 @@ namespace OpenSim.Region.ClientStack | |||
107 | // listenIP = IPAddress.Parse("0.0.0.0"); | 110 | // listenIP = IPAddress.Parse("0.0.0.0"); |
108 | 111 | ||
109 | uint port = (uint) regionInfo.InternalEndPoint.Port; | 112 | uint port = (uint) regionInfo.InternalEndPoint.Port; |
110 | udpServer = new UDPServer(listenIP, ref port, regionInfo.m_allow_alternate_ports, m_assetCache, m_log, circuitManager); | 113 | udpServer = new UDPServer(listenIP, ref port, regionInfo.m_allow_alternate_ports, m_assetCache, circuitManager); |
111 | regionInfo.InternalEndPoint.Port = (int)port; | 114 | regionInfo.InternalEndPoint.Port = (int)port; |
112 | 115 | ||
113 | Scene scene = CreateScene(regionInfo, m_storageManager, circuitManager); | 116 | Scene scene = CreateScene(regionInfo, m_storageManager, circuitManager); |
@@ -136,12 +139,12 @@ namespace OpenSim.Region.ClientStack | |||
136 | 139 | ||
137 | if (masterAvatar != null) | 140 | if (masterAvatar != null) |
138 | { | 141 | { |
139 | m_log.Verbose("PARCEL", "Found master avatar [" + masterAvatar.UUID.ToString() + "]"); | 142 | m_log.Info("[PARCEL]: Found master avatar [" + masterAvatar.UUID.ToString() + "]"); |
140 | scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID; | 143 | scene.RegionInfo.MasterAvatarAssignedUUID = masterAvatar.UUID; |
141 | } | 144 | } |
142 | else | 145 | else |
143 | { | 146 | { |
144 | m_log.Verbose("PARCEL", "No master avatar found, using null."); | 147 | m_log.Info("[PARCEL]: No master avatar found, using null."); |
145 | scene.RegionInfo.MasterAvatarAssignedUUID = LLUUID.Zero; | 148 | scene.RegionInfo.MasterAvatarAssignedUUID = LLUUID.Zero; |
146 | } | 149 | } |
147 | 150 | ||
diff --git a/OpenSim/Region/ClientStack/UDPServer.cs b/OpenSim/Region/ClientStack/UDPServer.cs index 3e2b536..f9918ff 100644 --- a/OpenSim/Region/ClientStack/UDPServer.cs +++ b/OpenSim/Region/ClientStack/UDPServer.cs | |||
@@ -39,6 +39,8 @@ namespace OpenSim.Region.ClientStack | |||
39 | { | 39 | { |
40 | public class UDPServer : ClientStackNetworkHandler | 40 | public class UDPServer : ClientStackNetworkHandler |
41 | { | 41 | { |
42 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
43 | |||
42 | protected Dictionary<EndPoint, uint> clientCircuits = new Dictionary<EndPoint, uint>(); | 44 | protected Dictionary<EndPoint, uint> clientCircuits = new Dictionary<EndPoint, uint>(); |
43 | public Dictionary<uint, EndPoint> clientCircuits_reverse = new Dictionary<uint, EndPoint>(); | 45 | public Dictionary<uint, EndPoint> clientCircuits_reverse = new Dictionary<uint, EndPoint>(); |
44 | public Socket Server; | 46 | public Socket Server; |
@@ -56,7 +58,6 @@ namespace OpenSim.Region.ClientStack | |||
56 | protected IPAddress listenIP = IPAddress.Parse("0.0.0.0"); | 58 | protected IPAddress listenIP = IPAddress.Parse("0.0.0.0"); |
57 | protected IScene m_localScene; | 59 | protected IScene m_localScene; |
58 | protected AssetCache m_assetCache; | 60 | protected AssetCache m_assetCache; |
59 | protected LogBase m_log; | ||
60 | protected AgentCircuitManager m_authenticateSessionsClass; | 61 | protected AgentCircuitManager m_authenticateSessionsClass; |
61 | 62 | ||
62 | public PacketServer PacketServer | 63 | public PacketServer PacketServer |
@@ -84,13 +85,12 @@ namespace OpenSim.Region.ClientStack | |||
84 | { | 85 | { |
85 | } | 86 | } |
86 | 87 | ||
87 | public UDPServer(IPAddress _listenIP, ref uint port, bool allow_alternate_port, AssetCache assetCache, LogBase console, AgentCircuitManager authenticateClass) | 88 | public UDPServer(IPAddress _listenIP, ref uint port, bool allow_alternate_port, AssetCache assetCache, AgentCircuitManager authenticateClass) |
88 | { | 89 | { |
89 | listenIP = _listenIP; | 90 | listenIP = _listenIP; |
90 | listenPort = port; | 91 | listenPort = port; |
91 | Allow_Alternate_Port = allow_alternate_port; | 92 | Allow_Alternate_Port = allow_alternate_port; |
92 | m_assetCache = assetCache; | 93 | m_assetCache = assetCache; |
93 | m_log = console; | ||
94 | m_authenticateSessionsClass = authenticateClass; | 94 | m_authenticateSessionsClass = authenticateClass; |
95 | CreatePacketServer(); | 95 | CreatePacketServer(); |
96 | 96 | ||
@@ -121,7 +121,7 @@ namespace OpenSim.Region.ClientStack | |||
121 | { | 121 | { |
122 | // TODO : Actually only handle those states that we have control over, re-throw everything else, | 122 | // TODO : Actually only handle those states that we have control over, re-throw everything else, |
123 | // TODO: implement cases as we encounter them. | 123 | // TODO: implement cases as we encounter them. |
124 | //m_log.Error("UDPSERVER", "Connection Error! - " + e.ToString()); | 124 | //m_log.Error("[UDPSERVER]: Connection Error! - " + e.ToString()); |
125 | switch (e.SocketErrorCode) | 125 | switch (e.SocketErrorCode) |
126 | { | 126 | { |
127 | case SocketError.AlreadyInProgress: | 127 | case SocketError.AlreadyInProgress: |
@@ -134,7 +134,7 @@ namespace OpenSim.Region.ClientStack | |||
134 | } | 134 | } |
135 | catch (Exception a) | 135 | catch (Exception a) |
136 | { | 136 | { |
137 | MainLog.Instance.Verbose("UDPSERVER", a.ToString()); | 137 | m_log.Info("[UDPSERVER]: " + a.ToString()); |
138 | } | 138 | } |
139 | try | 139 | try |
140 | { | 140 | { |
@@ -159,7 +159,7 @@ namespace OpenSim.Region.ClientStack | |||
159 | } | 159 | } |
160 | catch (Exception) | 160 | catch (Exception) |
161 | { | 161 | { |
162 | //MainLog.Instance.Verbose("UDPSERVER", a.ToString()); | 162 | //m_log.Info("[UDPSERVER]" + a.ToString()); |
163 | } | 163 | } |
164 | try | 164 | try |
165 | { | 165 | { |
@@ -191,8 +191,7 @@ namespace OpenSim.Region.ClientStack | |||
191 | } | 191 | } |
192 | catch (ObjectDisposedException) | 192 | catch (ObjectDisposedException) |
193 | { | 193 | { |
194 | 194 | //m_log.Debug("[UDPSERVER]: " + e.ToString()); | |
195 | //MainLog.Instance.Debug("UDPSERVER", e.ToString()); | ||
196 | return; | 195 | return; |
197 | } | 196 | } |
198 | 197 | ||
@@ -214,20 +213,20 @@ namespace OpenSim.Region.ClientStack | |||
214 | if (clientCircuits.TryGetValue(epSender, out circuit)) | 213 | if (clientCircuits.TryGetValue(epSender, out circuit)) |
215 | { | 214 | { |
216 | //if so then send packet to the packetserver | 215 | //if so then send packet to the packetserver |
217 | //MainLog.Instance.Warn("UDPSERVER", "ALREADY HAVE Circuit!"); | 216 | //m_log.Warn("[UDPSERVER]: ALREADY HAVE Circuit!"); |
218 | m_packetServer.InPacket(circuit, packet); | 217 | m_packetServer.InPacket(circuit, packet); |
219 | } | 218 | } |
220 | else if (packet.Type == PacketType.UseCircuitCode) | 219 | else if (packet.Type == PacketType.UseCircuitCode) |
221 | { | 220 | { |
222 | // new client | 221 | // new client |
223 | MainLog.Instance.Debug("UDPSERVER", "Adding New Client"); | 222 | m_log.Debug("[UDPSERVER]: Adding New Client"); |
224 | AddNewClient(packet); | 223 | AddNewClient(packet); |
225 | } | 224 | } |
226 | else | 225 | else |
227 | { | 226 | { |
228 | // invalid client | 227 | // invalid client |
229 | //CFK: This message seems to have served its usefullness as of 12-15 so I am commenting it out for now | 228 | //CFK: This message seems to have served its usefullness as of 12-15 so I am commenting it out for now |
230 | //m_log.Warn("UDPSERVER", "Got a packet from an invalid client - " + packet.ToString()); | 229 | //m_log.Warn("[UDPSERVER]: Got a packet from an invalid client - " + packet.ToString()); |
231 | 230 | ||
232 | } | 231 | } |
233 | } | 232 | } |
@@ -255,12 +254,11 @@ namespace OpenSim.Region.ClientStack | |||
255 | 254 | ||
256 | public void ServerListener() | 255 | public void ServerListener() |
257 | { | 256 | { |
258 | |||
259 | uint newPort = listenPort; | 257 | uint newPort = listenPort; |
260 | for (uint i = 0; i < 20; i++) | 258 | for (uint i = 0; i < 20; i++) |
261 | { | 259 | { |
262 | newPort = listenPort + i; | 260 | newPort = listenPort + i; |
263 | m_log.Verbose("SERVER", "Opening UDP socket on " + listenIP.ToString() + " " + newPort + ".");// Allow alternate ports: " + Allow_Alternate_Port.ToString()); | 261 | m_log.Info("[SERVER]: Opening UDP socket on " + listenIP.ToString() + " " + newPort + ".");// Allow alternate ports: " + Allow_Alternate_Port.ToString()); |
264 | try | 262 | try |
265 | { | 263 | { |
266 | ServerIncoming = new IPEndPoint(listenIP, (int) newPort); | 264 | ServerIncoming = new IPEndPoint(listenIP, (int) newPort); |
@@ -276,19 +274,19 @@ namespace OpenSim.Region.ClientStack | |||
276 | throw (ex); | 274 | throw (ex); |
277 | 275 | ||
278 | // We are looking for alternate ports! | 276 | // We are looking for alternate ports! |
279 | m_log.Verbose("SERVER", "UDP socket on " + listenIP.ToString() + " " + listenPort.ToString() + " is not available, trying next."); | 277 | m_log.Info("[SERVER]: UDP socket on " + listenIP.ToString() + " " + listenPort.ToString() + " is not available, trying next."); |
280 | } | 278 | } |
281 | System.Threading.Thread.Sleep(100); // Wait before we retry socket | 279 | System.Threading.Thread.Sleep(100); // Wait before we retry socket |
282 | } | 280 | } |
283 | 281 | ||
284 | m_log.Verbose("SERVER", "UDP socket bound, getting ready to listen"); | 282 | m_log.Info("[SERVER]: UDP socket bound, getting ready to listen"); |
285 | 283 | ||
286 | ipeSender = new IPEndPoint(listenIP, 0); | 284 | ipeSender = new IPEndPoint(listenIP, 0); |
287 | epSender = (EndPoint) ipeSender; | 285 | epSender = (EndPoint) ipeSender; |
288 | ReceivedData = new AsyncCallback(OnReceivedData); | 286 | ReceivedData = new AsyncCallback(OnReceivedData); |
289 | Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); | 287 | Server.BeginReceiveFrom(RecvBuffer, 0, RecvBuffer.Length, SocketFlags.None, ref epSender, ReceivedData, null); |
290 | 288 | ||
291 | m_log.Status("SERVER", "Listening on port " + newPort); | 289 | m_log.Info("[SERVER]: Listening on port " + newPort); |
292 | } | 290 | } |
293 | 291 | ||
294 | public virtual void RegisterPacketServer(PacketServer server) | 292 | public virtual void RegisterPacketServer(PacketServer server) |
diff --git a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs index 25452c1..98419ab 100644 --- a/OpenSim/Region/Communications/Local/LocalBackEndServices.cs +++ b/OpenSim/Region/Communications/Local/LocalBackEndServices.cs | |||
@@ -36,6 +36,8 @@ namespace OpenSim.Region.Communications.Local | |||
36 | { | 36 | { |
37 | public class LocalBackEndServices : IGridServices, IInterRegionCommunications | 37 | public class LocalBackEndServices : IGridServices, IInterRegionCommunications |
38 | { | 38 | { |
39 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
40 | |||
39 | protected Dictionary<ulong, RegionInfo> m_regions = new Dictionary<ulong, RegionInfo>(); | 41 | protected Dictionary<ulong, RegionInfo> m_regions = new Dictionary<ulong, RegionInfo>(); |
40 | 42 | ||
41 | protected Dictionary<ulong, RegionCommsListener> m_regionListeners = | 43 | protected Dictionary<ulong, RegionCommsListener> m_regionListeners = |
@@ -93,8 +95,9 @@ namespace OpenSim.Region.Communications.Local | |||
93 | RegionCommsListener regionHost = new RegionCommsListener(); | 95 | RegionCommsListener regionHost = new RegionCommsListener(); |
94 | if (m_regionListeners.ContainsKey(regionInfo.RegionHandle)) | 96 | if (m_regionListeners.ContainsKey(regionInfo.RegionHandle)) |
95 | { | 97 | { |
96 | MainLog.Instance.Error("INTERREGION", | 98 | m_log.Error("[INTERREGION]: " + |
97 | "Error:Region registered twice as an Events listener for Interregion Communications but not as a listed region. In Standalone mode this will cause BIG issues. In grid mode, it means a region went down and came back up."); | 99 | "Error:Region registered twice as an Events listener for Interregion Communications but not as a listed region. " + |
100 | "In Standalone mode this will cause BIG issues. In grid mode, it means a region went down and came back up."); | ||
98 | m_regionListeners.Remove(regionInfo.RegionHandle); | 101 | m_regionListeners.Remove(regionInfo.RegionHandle); |
99 | } | 102 | } |
100 | m_regionListeners.Add(regionInfo.RegionHandle, regionHost); | 103 | m_regionListeners.Add(regionInfo.RegionHandle, regionHost); |
@@ -105,7 +108,7 @@ namespace OpenSim.Region.Communications.Local | |||
105 | { | 108 | { |
106 | // Already in our list, so the region went dead and restarted. | 109 | // Already in our list, so the region went dead and restarted. |
107 | m_regions.Remove(regionInfo.RegionHandle); | 110 | m_regions.Remove(regionInfo.RegionHandle); |
108 | MainLog.Instance.Warn("INTERREGION", "Region registered twice. Region went down and came back up."); | 111 | m_log.Warn("[INTERREGION]: Region registered twice. Region went down and came back up."); |
109 | 112 | ||
110 | RegionCommsListener regionHost = new RegionCommsListener(); | 113 | RegionCommsListener regionHost = new RegionCommsListener(); |
111 | if (m_regionListeners.ContainsKey(regionInfo.RegionHandle)) | 114 | if (m_regionListeners.ContainsKey(regionInfo.RegionHandle)) |
@@ -229,7 +232,7 @@ namespace OpenSim.Region.Communications.Local | |||
229 | { | 232 | { |
230 | // Console.WriteLine("CommsManager- Informing a region to expect child agent"); | 233 | // Console.WriteLine("CommsManager- Informing a region to expect child agent"); |
231 | m_regionListeners[regionHandle].TriggerChildAgentUpdate(regionHandle, cAgentData); | 234 | m_regionListeners[regionHandle].TriggerChildAgentUpdate(regionHandle, cAgentData); |
232 | //MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: Got Listener trigginering local event: " + agentData.firstname + " " + agentData.lastname); | 235 | //m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Got Listener trigginering local event: " + agentData.firstname + " " + agentData.lastname); |
233 | 236 | ||
234 | return true; | 237 | return true; |
235 | } | 238 | } |
@@ -292,13 +295,13 @@ namespace OpenSim.Region.Communications.Local | |||
292 | //should change from agentCircuitData | 295 | //should change from agentCircuitData |
293 | { | 296 | { |
294 | //Console.WriteLine("CommsManager- Trying to Inform a region to expect child agent"); | 297 | //Console.WriteLine("CommsManager- Trying to Inform a region to expect child agent"); |
295 | //MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: Trying to inform region of child agent: " + agentData.firstname + " " + agentData.lastname); | 298 | //m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Trying to inform region of child agent: " + agentData.firstname + " " + agentData.lastname); |
296 | 299 | ||
297 | if (m_regionListeners.ContainsKey(regionHandle)) | 300 | if (m_regionListeners.ContainsKey(regionHandle)) |
298 | { | 301 | { |
299 | // Console.WriteLine("CommsManager- Informing a region to expect child agent"); | 302 | // Console.WriteLine("CommsManager- Informing a region to expect child agent"); |
300 | m_regionListeners[regionHandle].TriggerExpectUser(regionHandle, agentData); | 303 | m_regionListeners[regionHandle].TriggerExpectUser(regionHandle, agentData); |
301 | //MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: Got Listener trigginering local event: " + agentData.firstname + " " + agentData.lastname); | 304 | //m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Got Listener trigginering local event: " + agentData.firstname + " " + agentData.lastname); |
302 | 305 | ||
303 | return true; | 306 | return true; |
304 | } | 307 | } |
@@ -389,11 +392,11 @@ namespace OpenSim.Region.Communications.Local | |||
389 | 392 | ||
390 | public void TriggerExpectUser(ulong regionHandle, AgentCircuitData agent) | 393 | public void TriggerExpectUser(ulong regionHandle, AgentCircuitData agent) |
391 | { | 394 | { |
392 | //MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: Other region is sending child agent our way: " + agent.firstname + " " + agent.lastname); | 395 | //m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Other region is sending child agent our way: " + agent.firstname + " " + agent.lastname); |
393 | 396 | ||
394 | if (m_regionListeners.ContainsKey(regionHandle)) | 397 | if (m_regionListeners.ContainsKey(regionHandle)) |
395 | { | 398 | { |
396 | //MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: FoundLocalRegion To send it to: " + agent.firstname + " " + agent.lastname); | 399 | //m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: FoundLocalRegion To send it to: " + agent.firstname + " " + agent.lastname); |
397 | 400 | ||
398 | m_regionListeners[regionHandle].TriggerExpectUser(regionHandle, agent); | 401 | m_regionListeners[regionHandle].TriggerExpectUser(regionHandle, agent); |
399 | } | 402 | } |
@@ -443,11 +446,11 @@ namespace OpenSim.Region.Communications.Local | |||
443 | 446 | ||
444 | public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData) | 447 | public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData) |
445 | { | 448 | { |
446 | // MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: Other local region is sending child agent our way: " + agentData.firstname + " " + agentData.lastname); | 449 | // m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: Other local region is sending child agent our way: " + agentData.firstname + " " + agentData.lastname); |
447 | 450 | ||
448 | if (m_regionListeners.ContainsKey(regionHandle)) | 451 | if (m_regionListeners.ContainsKey(regionHandle)) |
449 | { | 452 | { |
450 | //MainLog.Instance.Verbose("INTER", rdebugRegionName + ":Local BackEnd: found local region to trigger event on: " + agentData.firstname + " " + agentData.lastname); | 453 | //m_log.Info("[INTER]: " + rdebugRegionName + ":Local BackEnd: found local region to trigger event on: " + agentData.firstname + " " + agentData.lastname); |
451 | 454 | ||
452 | TriggerExpectUser(regionHandle, agentData); | 455 | TriggerExpectUser(regionHandle, agentData); |
453 | return true; | 456 | return true; |
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index 2848b8a..f6dd379 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs | |||
@@ -44,6 +44,8 @@ namespace OpenSim.Region.Communications.Local | |||
44 | 44 | ||
45 | public class LocalLoginService : LoginService | 45 | public class LocalLoginService : LoginService |
46 | { | 46 | { |
47 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
48 | |||
47 | private CommunicationsLocal m_Parent; | 49 | private CommunicationsLocal m_Parent; |
48 | 50 | ||
49 | private NetworkServersInfo serversInfo; | 51 | private NetworkServersInfo serversInfo; |
@@ -77,7 +79,7 @@ namespace OpenSim.Region.Communications.Local | |||
77 | if (!authUsers) | 79 | if (!authUsers) |
78 | { | 80 | { |
79 | //no current user account so make one | 81 | //no current user account so make one |
80 | MainLog.Instance.Notice("LOGIN", "No user account found so creating a new one."); | 82 | m_log.Info("[LOGIN]: No user account found so creating a new one."); |
81 | 83 | ||
82 | m_userManager.AddUserProfile(firstname, lastname, "test", defaultHomeX, defaultHomeY); | 84 | m_userManager.AddUserProfile(firstname, lastname, "test", defaultHomeX, defaultHomeY); |
83 | 85 | ||
@@ -97,14 +99,14 @@ namespace OpenSim.Region.Communications.Local | |||
97 | if (!authUsers) | 99 | if (!authUsers) |
98 | { | 100 | { |
99 | //for now we will accept any password in sandbox mode | 101 | //for now we will accept any password in sandbox mode |
100 | MainLog.Instance.Notice("LOGIN", "Authorising user (no actual password check)"); | 102 | m_log.Info("[LOGIN]: Authorising user (no actual password check)"); |
101 | 103 | ||
102 | return true; | 104 | return true; |
103 | } | 105 | } |
104 | else | 106 | else |
105 | { | 107 | { |
106 | MainLog.Instance.Notice( | 108 | m_log.Info( |
107 | "LOGIN", "Authenticating " + profile.username + " " + profile.surname); | 109 | "[LOGIN]: Authenticating " + profile.username + " " + profile.surname); |
108 | 110 | ||
109 | if (!password.StartsWith("$1$")) | 111 | if (!password.StartsWith("$1$")) |
110 | password = "$1$" + Util.Md5Hash(password); | 112 | password = "$1$" + Util.Md5Hash(password); |
@@ -166,7 +168,7 @@ namespace OpenSim.Region.Communications.Local | |||
166 | } | 168 | } |
167 | else | 169 | else |
168 | { | 170 | { |
169 | MainLog.Instance.Warn("LOGIN", "Not found region " + currentRegion); | 171 | m_log.Warn("[LOGIN]: Not found region " + currentRegion); |
170 | } | 172 | } |
171 | } | 173 | } |
172 | private LoginResponse.BuddyList ConvertFriendListItem(List<FriendListItem> LFL) | 174 | private LoginResponse.BuddyList ConvertFriendListItem(List<FriendListItem> LFL) |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs index 1576bf3..f04574a 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1GridServices.cs | |||
@@ -47,6 +47,8 @@ namespace OpenSim.Region.Communications.OGS1 | |||
47 | { | 47 | { |
48 | public class OGS1GridServices : IGridServices, IInterRegionCommunications | 48 | public class OGS1GridServices : IGridServices, IInterRegionCommunications |
49 | { | 49 | { |
50 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
51 | |||
50 | private LocalBackEndServices m_localBackend = new LocalBackEndServices(); | 52 | private LocalBackEndServices m_localBackend = new LocalBackEndServices(); |
51 | private Dictionary<ulong, RegionInfo> m_remoteRegionInfoCache = new Dictionary<ulong, RegionInfo>(); | 53 | private Dictionary<ulong, RegionInfo> m_remoteRegionInfoCache = new Dictionary<ulong, RegionInfo>(); |
52 | private List<SimpleRegionInfo> m_knownRegions = new List<SimpleRegionInfo>(); | 54 | private List<SimpleRegionInfo> m_knownRegions = new List<SimpleRegionInfo>(); |
@@ -138,7 +140,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
138 | GridResp = GridReq.Send(serversInfo.GridURL, 10000); | 140 | GridResp = GridReq.Send(serversInfo.GridURL, 10000); |
139 | } catch (Exception ex) | 141 | } catch (Exception ex) |
140 | { | 142 | { |
141 | MainLog.Instance.Error("Unable to connect to grid. Grid server not running?"); | 143 | m_log.Error("Unable to connect to grid. Grid server not running?"); |
142 | throw(ex); | 144 | throw(ex); |
143 | } | 145 | } |
144 | Hashtable GridRespData = (Hashtable)GridResp.Value; | 146 | Hashtable GridRespData = (Hashtable)GridResp.Value; |
@@ -148,7 +150,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
148 | if (GridRespData.ContainsKey("error")) | 150 | if (GridRespData.ContainsKey("error")) |
149 | { | 151 | { |
150 | string errorstring = (string) GridRespData["error"]; | 152 | string errorstring = (string) GridRespData["error"]; |
151 | MainLog.Instance.Error("Unable to connect to grid: " + errorstring); | 153 | m_log.Error("Unable to connect to grid: " + errorstring); |
152 | return null; | 154 | return null; |
153 | } | 155 | } |
154 | else | 156 | else |
@@ -330,9 +332,9 @@ namespace OpenSim.Region.Communications.OGS1 | |||
330 | } | 332 | } |
331 | catch (WebException) | 333 | catch (WebException) |
332 | { | 334 | { |
333 | MainLog.Instance.Error("GRID", | 335 | m_log.Error("[GRID]: " + |
334 | "Region lookup failed for: " + regionHandle.ToString() + | 336 | "Region lookup failed for: " + regionHandle.ToString() + |
335 | " - Is the GridServer down?"); | 337 | " - Is the GridServer down?"); |
336 | return null; | 338 | return null; |
337 | } | 339 | } |
338 | } | 340 | } |
@@ -421,7 +423,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
421 | } | 423 | } |
422 | catch (Exception e) | 424 | catch (Exception e) |
423 | { | 425 | { |
424 | MainLog.Instance.Error("MapBlockQuery XMLRPC failure: " + e.ToString()); | 426 | m_log.Error("MapBlockQuery XMLRPC failure: " + e.ToString()); |
425 | return new Hashtable(); | 427 | return new Hashtable(); |
426 | } | 428 | } |
427 | } | 429 | } |
@@ -482,7 +484,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
482 | 484 | ||
483 | m_localBackend.TriggerExpectUser(regionHandle, agentData); | 485 | m_localBackend.TriggerExpectUser(regionHandle, agentData); |
484 | 486 | ||
485 | MainLog.Instance.Verbose("GRID", "Welcoming new user..."); | 487 | m_log.Info("[GRID]: Welcoming new user..."); |
486 | 488 | ||
487 | return new XmlRpcResponse(); | 489 | return new XmlRpcResponse(); |
488 | } | 490 | } |
@@ -555,7 +557,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
555 | Console.WriteLine("remoting object not found"); | 557 | Console.WriteLine("remoting object not found"); |
556 | } | 558 | } |
557 | remObject = null; | 559 | remObject = null; |
558 | //MainLog.Instance.Verbose("INTER", | 560 | //m_log.Info("[INTER]: " + |
559 | //gdebugRegionName + | 561 | //gdebugRegionName + |
560 | //": OGS1 tried to Update Child Agent data on outside region and got " + | 562 | //": OGS1 tried to Update Child Agent data on outside region and got " + |
561 | //retValue.ToString()); | 563 | //retValue.ToString()); |
@@ -569,45 +571,45 @@ namespace OpenSim.Region.Communications.OGS1 | |||
569 | catch (RemotingException e) | 571 | catch (RemotingException e) |
570 | { | 572 | { |
571 | NoteDeadRegion(regionHandle); | 573 | NoteDeadRegion(regionHandle); |
572 | MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + | 574 | m_log.Warn("Remoting Error: Unable to connect to adjacent region: " + |
573 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 575 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
574 | MainLog.Instance.Debug(e.ToString()); | 576 | m_log.Debug(e.ToString()); |
575 | return false; | 577 | return false; |
576 | } | 578 | } |
577 | catch (SocketException e) | 579 | catch (SocketException e) |
578 | { | 580 | { |
579 | NoteDeadRegion(regionHandle); | 581 | NoteDeadRegion(regionHandle); |
580 | MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region: " + " " + | 582 | m_log.Warn("Socket Error: Unable to connect to adjacent region: " + " " + |
581 | regInfo.RegionLocX + "," + regInfo.RegionLocY); | 583 | regInfo.RegionLocX + "," + regInfo.RegionLocY); |
582 | MainLog.Instance.Debug(e.ToString()); | 584 | m_log.Debug(e.ToString()); |
583 | return false; | 585 | return false; |
584 | } | 586 | } |
585 | catch (InvalidCredentialException e) | 587 | catch (InvalidCredentialException e) |
586 | { | 588 | { |
587 | NoteDeadRegion(regionHandle); | 589 | NoteDeadRegion(regionHandle); |
588 | MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region: " + | 590 | m_log.Warn("Invalid Credentials: Unable to connect to adjacent region: " + |
589 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 591 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
590 | MainLog.Instance.Debug(e.ToString()); | 592 | m_log.Debug(e.ToString()); |
591 | return false; | 593 | return false; |
592 | } | 594 | } |
593 | catch (AuthenticationException e) | 595 | catch (AuthenticationException e) |
594 | { | 596 | { |
595 | NoteDeadRegion(regionHandle); | 597 | NoteDeadRegion(regionHandle); |
596 | MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " + | 598 | m_log.Warn("Authentication exception: Unable to connect to adjacent region: " + |
597 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 599 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
598 | MainLog.Instance.Debug(e.ToString()); | 600 | m_log.Debug(e.ToString()); |
599 | return false; | 601 | return false; |
600 | } | 602 | } |
601 | catch (Exception e) | 603 | catch (Exception e) |
602 | { | 604 | { |
603 | NoteDeadRegion(regionHandle); | 605 | NoteDeadRegion(regionHandle); |
604 | MainLog.Instance.Debug(e.ToString()); | 606 | m_log.Debug(e.ToString()); |
605 | return false; | 607 | return false; |
606 | } | 608 | } |
607 | } | 609 | } |
608 | else | 610 | else |
609 | { | 611 | { |
610 | //MainLog.Instance.Verbose("INTERREGION", "Skipped Sending Child Update to a region because it failed too many times:" + regionHandle.ToString()); | 612 | //m_log.Info("[INTERREGION]: Skipped Sending Child Update to a region because it failed too many times:" + regionHandle.ToString()); |
611 | return false; | 613 | return false; |
612 | } | 614 | } |
613 | } | 615 | } |
@@ -650,10 +652,10 @@ namespace OpenSim.Region.Communications.OGS1 | |||
650 | Console.WriteLine("remoting object not found"); | 652 | Console.WriteLine("remoting object not found"); |
651 | } | 653 | } |
652 | remObject = null; | 654 | remObject = null; |
653 | MainLog.Instance.Verbose("INTER", | 655 | m_log.Info("[INTER]: " + |
654 | gdebugRegionName + ": OGS1 tried to InformRegionOfChildAgent for " + | 656 | gdebugRegionName + ": OGS1 tried to InformRegionOfChildAgent for " + |
655 | agentData.firstname + " " + agentData.lastname + " and got " + | 657 | agentData.firstname + " " + agentData.lastname + " and got " + |
656 | retValue.ToString()); | 658 | retValue.ToString()); |
657 | 659 | ||
658 | return retValue; | 660 | return retValue; |
659 | 661 | ||
@@ -664,41 +666,41 @@ namespace OpenSim.Region.Communications.OGS1 | |||
664 | catch (RemotingException e) | 666 | catch (RemotingException e) |
665 | { | 667 | { |
666 | NoteDeadRegion(regionHandle); | 668 | NoteDeadRegion(regionHandle); |
667 | MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + | 669 | m_log.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + |
668 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 670 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
669 | MainLog.Instance.Debug(e.ToString()); | 671 | m_log.Debug(e.ToString()); |
670 | return false; | 672 | return false; |
671 | } | 673 | } |
672 | catch (SocketException e) | 674 | catch (SocketException e) |
673 | { | 675 | { |
674 | NoteDeadRegion(regionHandle); | 676 | NoteDeadRegion(regionHandle); |
675 | MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " + | 677 | m_log.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " + |
676 | regInfo.RegionLocX + "," + regInfo.RegionLocY); | 678 | regInfo.RegionLocX + "," + regInfo.RegionLocY); |
677 | MainLog.Instance.Debug(e.ToString()); | 679 | m_log.Debug(e.ToString()); |
678 | return false; | 680 | return false; |
679 | } | 681 | } |
680 | catch (InvalidCredentialException e) | 682 | catch (InvalidCredentialException e) |
681 | { | 683 | { |
682 | NoteDeadRegion(regionHandle); | 684 | NoteDeadRegion(regionHandle); |
683 | MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionName + | 685 | m_log.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionName + |
684 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 686 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
685 | MainLog.Instance.Debug(e.ToString()); | 687 | m_log.Debug(e.ToString()); |
686 | return false; | 688 | return false; |
687 | } | 689 | } |
688 | catch (AuthenticationException e) | 690 | catch (AuthenticationException e) |
689 | { | 691 | { |
690 | NoteDeadRegion(regionHandle); | 692 | NoteDeadRegion(regionHandle); |
691 | MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " + | 693 | m_log.Warn("Authentication exception: Unable to connect to adjacent region: " + |
692 | regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 694 | regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
693 | MainLog.Instance.Debug(e.ToString()); | 695 | m_log.Debug(e.ToString()); |
694 | return false; | 696 | return false; |
695 | } | 697 | } |
696 | catch (Exception e) | 698 | catch (Exception e) |
697 | { | 699 | { |
698 | NoteDeadRegion(regionHandle); | 700 | NoteDeadRegion(regionHandle); |
699 | MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionName + | 701 | m_log.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionName + |
700 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 702 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
701 | MainLog.Instance.Debug(e.ToString()); | 703 | m_log.Debug(e.ToString()); |
702 | return false; | 704 | return false; |
703 | } | 705 | } |
704 | } | 706 | } |
@@ -748,7 +750,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
748 | Console.WriteLine("remoting object not found"); | 750 | Console.WriteLine("remoting object not found"); |
749 | } | 751 | } |
750 | remObject = null; | 752 | remObject = null; |
751 | MainLog.Instance.Verbose("INTER", gdebugRegionName + ": OGS1 tried to inform region I'm up"); | 753 | m_log.Info("[INTER]: " + gdebugRegionName + ": OGS1 tried to inform region I'm up"); |
752 | 754 | ||
753 | return retValue; | 755 | return retValue; |
754 | } | 756 | } |
@@ -765,49 +767,49 @@ namespace OpenSim.Region.Communications.OGS1 | |||
765 | } | 767 | } |
766 | catch (RemotingException e) | 768 | catch (RemotingException e) |
767 | { | 769 | { |
768 | MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region using tcp://" + | 770 | m_log.Warn("Remoting Error: Unable to connect to adjacent region using tcp://" + |
769 | regInfo.RemotingAddress + | 771 | regInfo.RemotingAddress + |
770 | ":" + regInfo.RemotingPort + | 772 | ":" + regInfo.RemotingPort + |
771 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + | 773 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + |
772 | " - Is this neighbor up?"); | 774 | " - Is this neighbor up?"); |
773 | MainLog.Instance.Debug(e.ToString()); | 775 | m_log.Debug(e.ToString()); |
774 | return false; | 776 | return false; |
775 | } | 777 | } |
776 | catch (SocketException e) | 778 | catch (SocketException e) |
777 | { | 779 | { |
778 | MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region using tcp://" + | 780 | m_log.Warn("Socket Error: Unable to connect to adjacent region using tcp://" + |
779 | regInfo.RemotingAddress + | 781 | regInfo.RemotingAddress + |
780 | ":" + regInfo.RemotingPort + | 782 | ":" + regInfo.RemotingPort + |
781 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + | 783 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + |
782 | " - Is this neighbor up?"); | 784 | " - Is this neighbor up?"); |
783 | MainLog.Instance.Debug(e.ToString()); | 785 | m_log.Debug(e.ToString()); |
784 | return false; | 786 | return false; |
785 | } | 787 | } |
786 | catch (InvalidCredentialException e) | 788 | catch (InvalidCredentialException e) |
787 | { | 789 | { |
788 | MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region using tcp://" + | 790 | m_log.Warn("Invalid Credentials: Unable to connect to adjacent region using tcp://" + |
789 | regInfo.RemotingAddress + | 791 | regInfo.RemotingAddress + |
790 | ":" + regInfo.RemotingPort + | 792 | ":" + regInfo.RemotingPort + |
791 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 793 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
792 | MainLog.Instance.Debug(e.ToString()); | 794 | m_log.Debug(e.ToString()); |
793 | return false; | 795 | return false; |
794 | } | 796 | } |
795 | catch (AuthenticationException e) | 797 | catch (AuthenticationException e) |
796 | { | 798 | { |
797 | MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region using tcp://" + | 799 | m_log.Warn("Authentication exception: Unable to connect to adjacent region using tcp://" + |
798 | regInfo.RemotingAddress + | 800 | regInfo.RemotingAddress + |
799 | ":" + regInfo.RemotingPort + | 801 | ":" + regInfo.RemotingPort + |
800 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 802 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
801 | MainLog.Instance.Debug(e.ToString()); | 803 | m_log.Debug(e.ToString()); |
802 | return false; | 804 | return false; |
803 | } | 805 | } |
804 | catch (Exception e) | 806 | catch (Exception e) |
805 | { | 807 | { |
806 | // This line errors with a Null Reference Exception.. Why? @.@ | 808 | // This line errors with a Null Reference Exception.. Why? @.@ |
807 | //MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region using tcp://" + regInfo.RemotingAddress + | 809 | //m_log.Warn("Unknown exception: Unable to connect to adjacent region using tcp://" + regInfo.RemotingAddress + |
808 | // ":" + regInfo.RemotingPort + | 810 | // ":" + regInfo.RemotingPort + |
809 | //"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + " - This is likely caused by an incompatibility in the protocol between this sim and that one"); | 811 | //"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + " - This is likely caused by an incompatibility in the protocol between this sim and that one"); |
810 | MainLog.Instance.Debug(e.ToString()); | 812 | m_log.Debug(e.ToString()); |
811 | return false; | 813 | return false; |
812 | } | 814 | } |
813 | } | 815 | } |
@@ -860,41 +862,41 @@ namespace OpenSim.Region.Communications.OGS1 | |||
860 | catch (RemotingException e) | 862 | catch (RemotingException e) |
861 | { | 863 | { |
862 | NoteDeadRegion(regionHandle); | 864 | NoteDeadRegion(regionHandle); |
863 | MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + | 865 | m_log.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + |
864 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 866 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
865 | MainLog.Instance.Debug(e.ToString()); | 867 | m_log.Debug(e.ToString()); |
866 | return false; | 868 | return false; |
867 | } | 869 | } |
868 | catch (SocketException e) | 870 | catch (SocketException e) |
869 | { | 871 | { |
870 | NoteDeadRegion(regionHandle); | 872 | NoteDeadRegion(regionHandle); |
871 | MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " + | 873 | m_log.Warn("Socket Error: Unable to connect to adjacent region: " + regInfo.RegionName + " " + |
872 | regInfo.RegionLocX + "," + regInfo.RegionLocY); | 874 | regInfo.RegionLocX + "," + regInfo.RegionLocY); |
873 | MainLog.Instance.Debug(e.ToString()); | 875 | m_log.Debug(e.ToString()); |
874 | return false; | 876 | return false; |
875 | } | 877 | } |
876 | catch (InvalidCredentialException e) | 878 | catch (InvalidCredentialException e) |
877 | { | 879 | { |
878 | NoteDeadRegion(regionHandle); | 880 | NoteDeadRegion(regionHandle); |
879 | MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionName + | 881 | m_log.Warn("Invalid Credentials: Unable to connect to adjacent region: " + regInfo.RegionName + |
880 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 882 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
881 | MainLog.Instance.Debug(e.ToString()); | 883 | m_log.Debug(e.ToString()); |
882 | return false; | 884 | return false; |
883 | } | 885 | } |
884 | catch (AuthenticationException e) | 886 | catch (AuthenticationException e) |
885 | { | 887 | { |
886 | NoteDeadRegion(regionHandle); | 888 | NoteDeadRegion(regionHandle); |
887 | MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region: " + | 889 | m_log.Warn("Authentication exception: Unable to connect to adjacent region: " + |
888 | regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 890 | regInfo.RegionName + " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
889 | MainLog.Instance.Debug(e.ToString()); | 891 | m_log.Debug(e.ToString()); |
890 | return false; | 892 | return false; |
891 | } | 893 | } |
892 | catch (Exception e) | 894 | catch (Exception e) |
893 | { | 895 | { |
894 | NoteDeadRegion(regionHandle); | 896 | NoteDeadRegion(regionHandle); |
895 | MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionName + | 897 | m_log.Warn("Unknown exception: Unable to connect to adjacent region: " + regInfo.RegionName + |
896 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 898 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
897 | MainLog.Instance.Debug(e.ToString()); | 899 | m_log.Debug(e.ToString()); |
898 | return false; | 900 | return false; |
899 | } | 901 | } |
900 | } | 902 | } |
@@ -947,9 +949,9 @@ namespace OpenSim.Region.Communications.OGS1 | |||
947 | catch (RemotingException e) | 949 | catch (RemotingException e) |
948 | { | 950 | { |
949 | NoteDeadRegion(regionHandle); | 951 | NoteDeadRegion(regionHandle); |
950 | MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + | 952 | m_log.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + |
951 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 953 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
952 | MainLog.Instance.Debug(e.ToString()); | 954 | m_log.Debug(e.ToString()); |
953 | return false; | 955 | return false; |
954 | } | 956 | } |
955 | catch | 957 | catch |
@@ -1000,9 +1002,9 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1000 | catch (RemotingException e) | 1002 | catch (RemotingException e) |
1001 | { | 1003 | { |
1002 | NoteDeadRegion(regionHandle); | 1004 | NoteDeadRegion(regionHandle); |
1003 | MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + | 1005 | m_log.Warn("Remoting Error: Unable to connect to adjacent region: " + regInfo.RegionName + |
1004 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 1006 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
1005 | MainLog.Instance.Debug(e.ToString()); | 1007 | m_log.Debug(e.ToString()); |
1006 | return false; | 1008 | return false; |
1007 | } | 1009 | } |
1008 | catch | 1010 | catch |
@@ -1052,61 +1054,61 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1052 | catch (RemotingException e) | 1054 | catch (RemotingException e) |
1053 | { | 1055 | { |
1054 | NoteDeadRegion(regionHandle); | 1056 | NoteDeadRegion(regionHandle); |
1055 | MainLog.Instance.Warn("Remoting Error: Unable to connect to adjacent region to tell it to close child agents: " + regInfo.RegionName + | 1057 | m_log.Warn("Remoting Error: Unable to connect to adjacent region to tell it to close child agents: " + regInfo.RegionName + |
1056 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 1058 | " " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
1057 | //MainLog.Instance.Debug(e.ToString()); | 1059 | //m_log.Debug(e.ToString()); |
1058 | return false; | 1060 | return false; |
1059 | } | 1061 | } |
1060 | 1062 | ||
1061 | catch (SocketException e) | 1063 | catch (SocketException e) |
1062 | { | 1064 | { |
1063 | NoteDeadRegion(regionHandle); | 1065 | NoteDeadRegion(regionHandle); |
1064 | MainLog.Instance.Warn("Socket Error: Unable to connect to adjacent region using tcp://" + | 1066 | m_log.Warn("Socket Error: Unable to connect to adjacent region using tcp://" + |
1065 | regInfo.RemotingAddress + | 1067 | regInfo.RemotingAddress + |
1066 | ":" + regInfo.RemotingPort + | 1068 | ":" + regInfo.RemotingPort + |
1067 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + | 1069 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + |
1068 | " - Is this neighbor up?"); | 1070 | " - Is this neighbor up?"); |
1069 | MainLog.Instance.Debug(e.ToString()); | 1071 | m_log.Debug(e.ToString()); |
1070 | return false; | 1072 | return false; |
1071 | } | 1073 | } |
1072 | catch (InvalidCredentialException e) | 1074 | catch (InvalidCredentialException e) |
1073 | { | 1075 | { |
1074 | NoteDeadRegion(regionHandle); | 1076 | NoteDeadRegion(regionHandle); |
1075 | MainLog.Instance.Warn("Invalid Credentials: Unable to connect to adjacent region using tcp://" + | 1077 | m_log.Warn("Invalid Credentials: Unable to connect to adjacent region using tcp://" + |
1076 | regInfo.RemotingAddress + | 1078 | regInfo.RemotingAddress + |
1077 | ":" + regInfo.RemotingPort + | 1079 | ":" + regInfo.RemotingPort + |
1078 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 1080 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
1079 | MainLog.Instance.Debug(e.ToString()); | 1081 | m_log.Debug(e.ToString()); |
1080 | return false; | 1082 | return false; |
1081 | } | 1083 | } |
1082 | catch (AuthenticationException e) | 1084 | catch (AuthenticationException e) |
1083 | { | 1085 | { |
1084 | NoteDeadRegion(regionHandle); | 1086 | NoteDeadRegion(regionHandle); |
1085 | MainLog.Instance.Warn("Authentication exception: Unable to connect to adjacent region using tcp://" + | 1087 | m_log.Warn("Authentication exception: Unable to connect to adjacent region using tcp://" + |
1086 | regInfo.RemotingAddress + | 1088 | regInfo.RemotingAddress + |
1087 | ":" + regInfo.RemotingPort + | 1089 | ":" + regInfo.RemotingPort + |
1088 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 1090 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
1089 | MainLog.Instance.Debug(e.ToString()); | 1091 | m_log.Debug(e.ToString()); |
1090 | return false; | 1092 | return false; |
1091 | } | 1093 | } |
1092 | catch (WebException e) | 1094 | catch (WebException e) |
1093 | { | 1095 | { |
1094 | NoteDeadRegion(regionHandle); | 1096 | NoteDeadRegion(regionHandle); |
1095 | MainLog.Instance.Warn("WebException exception: Unable to connect to adjacent region using tcp://" + | 1097 | m_log.Warn("WebException exception: Unable to connect to adjacent region using tcp://" + |
1096 | regInfo.RemotingAddress + | 1098 | regInfo.RemotingAddress + |
1097 | ":" + regInfo.RemotingPort + | 1099 | ":" + regInfo.RemotingPort + |
1098 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); | 1100 | "/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY); |
1099 | MainLog.Instance.Debug(e.ToString()); | 1101 | m_log.Debug(e.ToString()); |
1100 | return false; | 1102 | return false; |
1101 | } | 1103 | } |
1102 | catch (Exception e) | 1104 | catch (Exception e) |
1103 | { | 1105 | { |
1104 | NoteDeadRegion(regionHandle); | 1106 | NoteDeadRegion(regionHandle); |
1105 | // This line errors with a Null Reference Exception.. Why? @.@ | 1107 | // This line errors with a Null Reference Exception.. Why? @.@ |
1106 | //MainLog.Instance.Warn("Unknown exception: Unable to connect to adjacent region using tcp://" + regInfo.RemotingAddress + | 1108 | //m_log.Warn("Unknown exception: Unable to connect to adjacent region using tcp://" + regInfo.RemotingAddress + |
1107 | // ":" + regInfo.RemotingPort + | 1109 | // ":" + regInfo.RemotingPort + |
1108 | //"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + " - This is likely caused by an incompatibility in the protocol between this sim and that one"); | 1110 | //"/InterRegions - @ " + regInfo.RegionLocX + "," + regInfo.RegionLocY + " - This is likely caused by an incompatibility in the protocol between this sim and that one"); |
1109 | MainLog.Instance.Debug(e.ToString()); | 1111 | m_log.Debug(e.ToString()); |
1110 | return false; | 1112 | return false; |
1111 | } | 1113 | } |
1112 | } | 1114 | } |
@@ -1133,7 +1135,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1133 | /// <returns></returns> | 1135 | /// <returns></returns> |
1134 | public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData) | 1136 | public bool IncomingChildAgent(ulong regionHandle, AgentCircuitData agentData) |
1135 | { | 1137 | { |
1136 | //MainLog.Instance.Verbose("INTER", gdebugRegionName + ": Incoming OGS1 Agent " + agentData.firstname + " " + agentData.lastname); | 1138 | //m_log.Info("[INTER]: " + gdebugRegionName + ": Incoming OGS1 Agent " + agentData.firstname + " " + agentData.lastname); |
1137 | 1139 | ||
1138 | try | 1140 | try |
1139 | { | 1141 | { |
@@ -1141,16 +1143,16 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1141 | } | 1143 | } |
1142 | catch (RemotingException) | 1144 | catch (RemotingException) |
1143 | { | 1145 | { |
1144 | //MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString()); | 1146 | //m_log.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString()); |
1145 | return false; | 1147 | return false; |
1146 | } | 1148 | } |
1147 | } | 1149 | } |
1148 | 1150 | ||
1149 | public bool TriggerRegionUp(SearializableRegionInfo regionData, ulong regionhandle) | 1151 | public bool TriggerRegionUp(SearializableRegionInfo regionData, ulong regionhandle) |
1150 | { | 1152 | { |
1151 | MainLog.Instance.Verbose("INTER", | 1153 | m_log.Info("[INTER]: " + |
1152 | gdebugRegionName + "Incoming OGS1 RegionUpReport: " + "(" + regionData.RegionLocX + | 1154 | gdebugRegionName + "Incoming OGS1 RegionUpReport: " + "(" + regionData.RegionLocX + |
1153 | "," + regionData.RegionLocY + "). Giving this region a fresh set of 'dead' tries"); | 1155 | "," + regionData.RegionLocY + "). Giving this region a fresh set of 'dead' tries"); |
1154 | 1156 | ||
1155 | try | 1157 | try |
1156 | { | 1158 | { |
@@ -1169,14 +1171,14 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1169 | 1171 | ||
1170 | catch (RemotingException e) | 1172 | catch (RemotingException e) |
1171 | { | 1173 | { |
1172 | MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString()); | 1174 | m_log.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString()); |
1173 | return false; | 1175 | return false; |
1174 | } | 1176 | } |
1175 | } | 1177 | } |
1176 | 1178 | ||
1177 | public bool TriggerChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData) | 1179 | public bool TriggerChildAgentUpdate(ulong regionHandle, ChildAgentDataUpdate cAgentData) |
1178 | { | 1180 | { |
1179 | //MainLog.Instance.Verbose("INTER", "Incoming OGS1 Child Agent Data Update"); | 1181 | //m_log.Info("[INTER]: Incoming OGS1 Child Agent Data Update"); |
1180 | 1182 | ||
1181 | try | 1183 | try |
1182 | { | 1184 | { |
@@ -1184,7 +1186,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1184 | } | 1186 | } |
1185 | catch (RemotingException e) | 1187 | catch (RemotingException e) |
1186 | { | 1188 | { |
1187 | MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString()); | 1189 | m_log.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString()); |
1188 | return false; | 1190 | return false; |
1189 | } | 1191 | } |
1190 | } | 1192 | } |
@@ -1206,7 +1208,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1206 | } | 1208 | } |
1207 | catch (RemotingException e) | 1209 | catch (RemotingException e) |
1208 | { | 1210 | { |
1209 | MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString()); | 1211 | m_log.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString()); |
1210 | return false; | 1212 | return false; |
1211 | } | 1213 | } |
1212 | } | 1214 | } |
@@ -1226,7 +1228,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1226 | } | 1228 | } |
1227 | catch (RemotingException e) | 1229 | catch (RemotingException e) |
1228 | { | 1230 | { |
1229 | MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString()); | 1231 | m_log.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString()); |
1230 | return false; | 1232 | return false; |
1231 | } | 1233 | } |
1232 | } | 1234 | } |
@@ -1239,7 +1241,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1239 | } | 1241 | } |
1240 | catch (RemotingException e) | 1242 | catch (RemotingException e) |
1241 | { | 1243 | { |
1242 | MainLog.Instance.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString()); | 1244 | m_log.Error("Remoting Error: Unable to connect to adjacent region.\n" + e.ToString()); |
1243 | return false; | 1245 | return false; |
1244 | } | 1246 | } |
1245 | } | 1247 | } |
@@ -1252,7 +1254,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
1252 | } | 1254 | } |
1253 | catch (RemotingException) | 1255 | catch (RemotingException) |
1254 | { | 1256 | { |
1255 | MainLog.Instance.Verbose("INTERREGION", "Remoting Error: Unable to connect to neighbour to tell it to close a child connection"); | 1257 | m_log.Info("[INTERREGION]: Remoting Error: Unable to connect to neighbour to tell it to close a child connection"); |
1256 | return false; | 1258 | return false; |
1257 | } | 1259 | } |
1258 | 1260 | ||
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs index b39e0b7..217bb81 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InterSimComms.cs | |||
@@ -141,6 +141,8 @@ namespace OpenSim.Region.Communications.OGS1 | |||
141 | 141 | ||
142 | public class OGS1InterRegionRemoting : MarshalByRefObject | 142 | public class OGS1InterRegionRemoting : MarshalByRefObject |
143 | { | 143 | { |
144 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
145 | |||
144 | public OGS1InterRegionRemoting() | 146 | public OGS1InterRegionRemoting() |
145 | { | 147 | { |
146 | } | 148 | } |
@@ -230,18 +232,18 @@ namespace OpenSim.Region.Communications.OGS1 | |||
230 | return false; | 232 | return false; |
231 | } | 233 | } |
232 | } | 234 | } |
235 | |||
233 | public bool TellRegionToCloseChildConnection(ulong regionHandle, Guid agentID) | 236 | public bool TellRegionToCloseChildConnection(ulong regionHandle, Guid agentID) |
234 | { | 237 | { |
235 | try | 238 | try |
236 | { | 239 | { |
237 | return InterRegionSingleton.Instance.TellRegionToCloseChildConnection(regionHandle, new LLUUID(agentID)); | 240 | return InterRegionSingleton.Instance.TellRegionToCloseChildConnection(regionHandle, new LLUUID(agentID)); |
238 | |||
239 | } | 241 | } |
240 | catch (RemotingException) | 242 | catch (RemotingException) |
241 | { | 243 | { |
242 | OpenSim.Framework.Console.MainLog.Instance.Verbose("INTERREGION", "Remoting Error: Unable to connect to remote region: " + regionHandle.ToString()); | 244 | m_log.Info("[INTERREGION]: Remoting Error: Unable to connect to remote region: " + regionHandle.ToString()); |
243 | return false; | 245 | return false; |
244 | } | 246 | } |
245 | } | 247 | } |
246 | } | 248 | } |
247 | } \ No newline at end of file | 249 | } |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs index 1780707..656dd70 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1InventoryService.cs | |||
@@ -38,6 +38,8 @@ namespace OpenSim.Region.Communications.OGS1 | |||
38 | { | 38 | { |
39 | public class OGS1InventoryService : IInventoryServices | 39 | public class OGS1InventoryService : IInventoryServices |
40 | { | 40 | { |
41 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
41 | private string _inventoryServerUrl; | 43 | private string _inventoryServerUrl; |
42 | private Dictionary<LLUUID, InventoryRequest> m_RequestingInventory = new Dictionary<LLUUID, InventoryRequest>(); | 44 | private Dictionary<LLUUID, InventoryRequest> m_RequestingInventory = new Dictionary<LLUUID, InventoryRequest>(); |
43 | 45 | ||
@@ -71,9 +73,9 @@ namespace OpenSim.Region.Communications.OGS1 | |||
71 | { | 73 | { |
72 | try | 74 | try |
73 | { | 75 | { |
74 | MainLog.Instance.Verbose( | 76 | m_log.Info( |
75 | "INVENTORY", "Requesting inventory from {0}/GetInventory/ for user {1}", | 77 | String.Format("[INVENTORY]: Requesting inventory from {0}/GetInventory/ for user {1}", |
76 | _inventoryServerUrl, userID); | 78 | _inventoryServerUrl, userID)); |
77 | 79 | ||
78 | RestObjectPosterResponse<InventoryCollection> requester | 80 | RestObjectPosterResponse<InventoryCollection> requester |
79 | = new RestObjectPosterResponse<InventoryCollection>(); | 81 | = new RestObjectPosterResponse<InventoryCollection>(); |
@@ -83,7 +85,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
83 | } | 85 | } |
84 | catch (Exception e) | 86 | catch (Exception e) |
85 | { | 87 | { |
86 | MainLog.Instance.Error("INVENTORY", e.ToString()); | 88 | m_log.Error("[INVENTORY]: " + e.ToString()); |
87 | } | 89 | } |
88 | } | 90 | } |
89 | 91 | ||
@@ -96,9 +98,9 @@ namespace OpenSim.Region.Communications.OGS1 | |||
96 | LLUUID userID = response.UserID; | 98 | LLUUID userID = response.UserID; |
97 | if (m_RequestingInventory.ContainsKey(userID)) | 99 | if (m_RequestingInventory.ContainsKey(userID)) |
98 | { | 100 | { |
99 | MainLog.Instance.Verbose("INVENTORY", | 101 | m_log.Info(String.Format("[INVENTORY]: " + |
100 | "Received inventory response for user {0} containing {1} folders and {2} items", | 102 | "Received inventory response for user {0} containing {1} folders and {2} items", |
101 | userID, response.Folders.Count, response.AllItems.Count); | 103 | userID, response.Folders.Count, response.AllItems.Count)); |
102 | 104 | ||
103 | InventoryFolderImpl rootFolder = null; | 105 | InventoryFolderImpl rootFolder = null; |
104 | InventoryRequest request = m_RequestingInventory[userID]; | 106 | InventoryRequest request = m_RequestingInventory[userID]; |
@@ -132,10 +134,10 @@ namespace OpenSim.Region.Communications.OGS1 | |||
132 | } | 134 | } |
133 | else | 135 | else |
134 | { | 136 | { |
135 | MainLog.Instance.Warn( | 137 | m_log.Warn( |
136 | "INVENTORY", | 138 | String.Format("[INVENTORY]: " + |
137 | "Received inventory response for {0} for which we do not have a record of requesting!", | 139 | "Received inventory response for {0} for which we do not have a record of requesting!", |
138 | userID); | 140 | userID)); |
139 | } | 141 | } |
140 | } | 142 | } |
141 | 143 | ||
@@ -198,4 +200,4 @@ namespace OpenSim.Region.Communications.OGS1 | |||
198 | } | 200 | } |
199 | } | 201 | } |
200 | } | 202 | } |
201 | } \ No newline at end of file | 203 | } |
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs index 70b7e89..9a22d14 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs | |||
@@ -40,6 +40,8 @@ namespace OpenSim.Region.Communications.OGS1 | |||
40 | { | 40 | { |
41 | public class OGS1UserServices : IUserService | 41 | public class OGS1UserServices : IUserService |
42 | { | 42 | { |
43 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
44 | |||
43 | private CommunicationsOGS1 m_parent; | 45 | private CommunicationsOGS1 m_parent; |
44 | 46 | ||
45 | public OGS1UserServices(CommunicationsOGS1 parent) | 47 | public OGS1UserServices(CommunicationsOGS1 parent) |
@@ -51,10 +53,10 @@ namespace OpenSim.Region.Communications.OGS1 | |||
51 | { | 53 | { |
52 | if (data.Contains("error_type")) | 54 | if (data.Contains("error_type")) |
53 | { | 55 | { |
54 | MainLog.Instance.Warn("GRID", | 56 | m_log.Warn("[GRID]: " + |
55 | "Error sent by user server when trying to get user profile: (" + | 57 | "Error sent by user server when trying to get user profile: (" + |
56 | data["error_type"] + | 58 | data["error_type"] + |
57 | "): " + data["error_desc"]); | 59 | "): " + data["error_desc"]); |
58 | return null; | 60 | return null; |
59 | } | 61 | } |
60 | 62 | ||
@@ -104,7 +106,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
104 | } | 106 | } |
105 | else | 107 | else |
106 | { | 108 | { |
107 | MainLog.Instance.Warn("INTERGRID", "Got invalid queryID from userServer"); | 109 | m_log.Warn("[INTERGRID]: Got invalid queryID from userServer"); |
108 | } | 110 | } |
109 | return pickerlist; | 111 | return pickerlist; |
110 | } | 112 | } |
@@ -158,7 +160,7 @@ namespace OpenSim.Region.Communications.OGS1 | |||
158 | } | 160 | } |
159 | catch (System.Net.WebException) | 161 | catch (System.Net.WebException) |
160 | { | 162 | { |
161 | MainLog.Instance.Warn("LOGOFF", "Unable to notify grid server of user logoff"); | 163 | m_log.Warn("[LOGOFF]: Unable to notify grid server of user logoff"); |
162 | } | 164 | } |
163 | 165 | ||
164 | 166 | ||
@@ -186,8 +188,8 @@ namespace OpenSim.Region.Communications.OGS1 | |||
186 | } | 188 | } |
187 | catch (WebException e) | 189 | catch (WebException e) |
188 | { | 190 | { |
189 | MainLog.Instance.Warn("Error when trying to fetch Avatar Picker Response: " + | 191 | m_log.Warn("Error when trying to fetch Avatar Picker Response: " + |
190 | e.Message); | 192 | e.Message); |
191 | // Return Empty picker list (no results) | 193 | // Return Empty picker list (no results) |
192 | } | 194 | } |
193 | return pickerlist; | 195 | return pickerlist; |
@@ -209,8 +211,8 @@ namespace OpenSim.Region.Communications.OGS1 | |||
209 | } | 211 | } |
210 | catch (WebException e) | 212 | catch (WebException e) |
211 | { | 213 | { |
212 | MainLog.Instance.Warn("Error when trying to fetch profile data by name from remote user server: " + | 214 | m_log.Warn("Error when trying to fetch profile data by name from remote user server: " + |
213 | e.Message); | 215 | e.Message); |
214 | } | 216 | } |
215 | return null; | 217 | return null; |
216 | } | 218 | } |
@@ -299,24 +301,24 @@ namespace OpenSim.Region.Communications.OGS1 | |||
299 | } | 301 | } |
300 | else | 302 | else |
301 | { | 303 | { |
302 | MainLog.Instance.Warn("GRID", "Unable to add new friend, User Server Reported an issue"); | 304 | m_log.Warn("[GRID]: Unable to add new friend, User Server Reported an issue"); |
303 | } | 305 | } |
304 | } | 306 | } |
305 | else | 307 | else |
306 | { | 308 | { |
307 | MainLog.Instance.Warn("GRID", "Unable to add new friend, UserServer didn't understand me!"); | 309 | m_log.Warn("[GRID]: Unable to add new friend, UserServer didn't understand me!"); |
308 | } | 310 | } |
309 | } | 311 | } |
310 | else | 312 | else |
311 | { | 313 | { |
312 | MainLog.Instance.Warn("GRID", "Unable to add new friend, UserServer didn't understand me!"); | 314 | m_log.Warn("[GRID]: Unable to add new friend, UserServer didn't understand me!"); |
313 | 315 | ||
314 | } | 316 | } |
315 | } | 317 | } |
316 | catch (WebException e) | 318 | catch (WebException e) |
317 | { | 319 | { |
318 | MainLog.Instance.Warn("GRID","Error when trying to AddNewUserFriend: " + | 320 | m_log.Warn("[GRID]: Error when trying to AddNewUserFriend: " + |
319 | e.Message); | 321 | e.Message); |
320 | 322 | ||
321 | } | 323 | } |
322 | 324 | ||
@@ -352,24 +354,24 @@ namespace OpenSim.Region.Communications.OGS1 | |||
352 | } | 354 | } |
353 | else | 355 | else |
354 | { | 356 | { |
355 | MainLog.Instance.Warn("GRID", "Unable to remove friend, User Server Reported an issue"); | 357 | m_log.Warn("[GRID]: Unable to remove friend, User Server Reported an issue"); |
356 | } | 358 | } |
357 | } | 359 | } |
358 | else | 360 | else |
359 | { | 361 | { |
360 | MainLog.Instance.Warn("GRID", "Unable to remove friend, UserServer didn't understand me!"); | 362 | m_log.Warn("[GRID]: Unable to remove friend, UserServer didn't understand me!"); |
361 | } | 363 | } |
362 | } | 364 | } |
363 | else | 365 | else |
364 | { | 366 | { |
365 | MainLog.Instance.Warn("GRID", "Unable to remove friend, UserServer didn't understand me!"); | 367 | m_log.Warn("[GRID]: Unable to remove friend, UserServer didn't understand me!"); |
366 | 368 | ||
367 | } | 369 | } |
368 | } | 370 | } |
369 | catch (WebException e) | 371 | catch (WebException e) |
370 | { | 372 | { |
371 | MainLog.Instance.Warn("GRID", "Error when trying to RemoveUserFriend: " + | 373 | m_log.Warn("[GRID]: Error when trying to RemoveUserFriend: " + |
372 | e.Message); | 374 | e.Message); |
373 | 375 | ||
374 | } | 376 | } |
375 | } | 377 | } |
@@ -404,25 +406,24 @@ namespace OpenSim.Region.Communications.OGS1 | |||
404 | } | 406 | } |
405 | else | 407 | else |
406 | { | 408 | { |
407 | MainLog.Instance.Warn("GRID", "Unable to update_user_friend_perms, User Server Reported an issue"); | 409 | m_log.Warn("[GRID]: Unable to update_user_friend_perms, User Server Reported an issue"); |
408 | } | 410 | } |
409 | } | 411 | } |
410 | else | 412 | else |
411 | { | 413 | { |
412 | MainLog.Instance.Warn("GRID", "Unable to update_user_friend_perms, UserServer didn't understand me!"); | 414 | m_log.Warn("[GRID]: Unable to update_user_friend_perms, UserServer didn't understand me!"); |
413 | } | 415 | } |
414 | } | 416 | } |
415 | else | 417 | else |
416 | { | 418 | { |
417 | MainLog.Instance.Warn("GRID", "Unable to update_user_friend_perms, UserServer didn't understand me!"); | 419 | m_log.Warn("[GRID]: Unable to update_user_friend_perms, UserServer didn't understand me!"); |
418 | 420 | ||
419 | } | 421 | } |
420 | } | 422 | } |
421 | catch (WebException e) | 423 | catch (WebException e) |
422 | { | 424 | { |
423 | MainLog.Instance.Warn("GRID", "Error when trying to update_user_friend_perms: " + | 425 | m_log.Warn("[GRID]: Error when trying to update_user_friend_perms: " + |
424 | e.Message); | 426 | e.Message); |
425 | |||
426 | } | 427 | } |
427 | } | 428 | } |
428 | /// <summary> | 429 | /// <summary> |
@@ -452,14 +453,13 @@ namespace OpenSim.Region.Communications.OGS1 | |||
452 | } | 453 | } |
453 | catch (WebException e) | 454 | catch (WebException e) |
454 | { | 455 | { |
455 | MainLog.Instance.Warn("Error when trying to fetch Avatar's friends list: " + | 456 | m_log.Warn("Error when trying to fetch Avatar's friends list: " + |
456 | e.Message); | 457 | e.Message); |
457 | // Return Empty list (no friends) | 458 | // Return Empty list (no friends) |
458 | } | 459 | } |
459 | return buddylist; | 460 | return buddylist; |
460 | |||
461 | } | 461 | } |
462 | 462 | ||
463 | #endregion | 463 | #endregion |
464 | } | 464 | } |
465 | } \ No newline at end of file | 465 | } |
diff --git a/OpenSim/Region/Environment/EstateManager.cs b/OpenSim/Region/Environment/EstateManager.cs index edc86e5..860bd93 100644 --- a/OpenSim/Region/Environment/EstateManager.cs +++ b/OpenSim/Region/Environment/EstateManager.cs | |||
@@ -41,6 +41,8 @@ namespace OpenSim.Region.Environment | |||
41 | /// </summary> | 41 | /// </summary> |
42 | public class EstateManager | 42 | public class EstateManager |
43 | { | 43 | { |
44 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
45 | |||
44 | private Scene m_scene; | 46 | private Scene m_scene; |
45 | private RegionInfo m_regInfo; | 47 | private RegionInfo m_regInfo; |
46 | 48 | ||
@@ -156,7 +158,7 @@ namespace OpenSim.Region.Environment | |||
156 | { | 158 | { |
157 | case "getinfo": | 159 | case "getinfo": |
158 | 160 | ||
159 | //MainLog.Instance.Verbose("ESTATE","CLIENT--->" + packet.ToString()); | 161 | //m_log.Info("[ESTATE]: CLIENT--->" + packet.ToString()); |
160 | sendRegionInfoPacketToAll(); | 162 | sendRegionInfoPacketToAll(); |
161 | if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId)) | 163 | if (m_scene.PermissionsMngr.GenericEstatePermission(remote_client.AgentId)) |
162 | { | 164 | { |
@@ -223,7 +225,7 @@ namespace OpenSim.Region.Environment | |||
223 | } | 225 | } |
224 | break; | 226 | break; |
225 | default: | 227 | default: |
226 | MainLog.Instance.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString()); | 228 | m_log.Error("EstateOwnerMessage: Unknown method requested\n" + packet.ToString()); |
227 | break; | 229 | break; |
228 | } | 230 | } |
229 | } | 231 | } |
@@ -283,7 +285,7 @@ namespace OpenSim.Region.Environment | |||
283 | returnblock[8].Parameter = Helpers.StringToField("1"); | 285 | returnblock[8].Parameter = Helpers.StringToField("1"); |
284 | 286 | ||
285 | packet.ParamList = returnblock; | 287 | packet.ParamList = returnblock; |
286 | //MainLog.Instance.Verbose("ESTATE", "SIM--->" + packet.ToString()); | 288 | //m_log.Info("[ESTATE]: SIM--->" + packet.ToString()); |
287 | remote_client.OutPacket(packet, ThrottleOutPacketType.Task); | 289 | remote_client.OutPacket(packet, ThrottleOutPacketType.Task); |
288 | 290 | ||
289 | sendEstateManagerList(remote_client, packet); | 291 | sendEstateManagerList(remote_client, packet); |
@@ -322,7 +324,7 @@ namespace OpenSim.Region.Environment | |||
322 | returnblock[j].Parameter = EstateManagers[i].GetBytes(); j++; | 324 | returnblock[j].Parameter = EstateManagers[i].GetBytes(); j++; |
323 | } | 325 | } |
324 | packet.ParamList = returnblock; | 326 | packet.ParamList = returnblock; |
325 | //MainLog.Instance.Verbose("ESTATE", "SIM--->" + packet.ToString()); | 327 | //m_log.Info("[ESTATE]: SIM--->" + packet.ToString()); |
326 | remote_client.OutPacket(packet, ThrottleOutPacketType.Task); | 328 | remote_client.OutPacket(packet, ThrottleOutPacketType.Task); |
327 | } | 329 | } |
328 | 330 | ||
@@ -364,10 +366,10 @@ namespace OpenSim.Region.Environment | |||
364 | 366 | ||
365 | default: | 367 | default: |
366 | 368 | ||
367 | MainLog.Instance.Error("EstateOwnerMessage: Unknown EstateAccessType requested in estateAccessDelta\n" + packet.ToString()); | 369 | m_log.Error("EstateOwnerMessage: Unknown EstateAccessType requested in estateAccessDelta\n" + packet.ToString()); |
368 | break; | 370 | break; |
369 | } | 371 | } |
370 | //MainLog.Instance.Error("EstateOwnerMessage: estateAccessDelta\n" + packet.ToString()); | 372 | //m_log.Error("EstateOwnerMessage: estateAccessDelta\n" + packet.ToString()); |
371 | 373 | ||
372 | 374 | ||
373 | } | 375 | } |
@@ -375,7 +377,7 @@ namespace OpenSim.Region.Environment | |||
375 | { | 377 | { |
376 | if (packet.ParamList.Length != 9) | 378 | if (packet.ParamList.Length != 9) |
377 | { | 379 | { |
378 | MainLog.Instance.Error("EstateOwnerMessage: SetRegionInfo method has a ParamList of invalid length"); | 380 | m_log.Error("EstateOwnerMessage: SetRegionInfo method has a ParamList of invalid length"); |
379 | } | 381 | } |
380 | else | 382 | else |
381 | { | 383 | { |
@@ -438,7 +440,7 @@ namespace OpenSim.Region.Environment | |||
438 | { | 440 | { |
439 | if (packet.ParamList.Length != 9) | 441 | if (packet.ParamList.Length != 9) |
440 | { | 442 | { |
441 | MainLog.Instance.Error("EstateOwnerMessage: SetRegionTerrain method has a ParamList of invalid length"); | 443 | m_log.Error("EstateOwnerMessage: SetRegionTerrain method has a ParamList of invalid length"); |
442 | } | 444 | } |
443 | else | 445 | else |
444 | { | 446 | { |
@@ -463,7 +465,7 @@ namespace OpenSim.Region.Environment | |||
463 | } | 465 | } |
464 | catch (Exception ex) | 466 | catch (Exception ex) |
465 | { | 467 | { |
466 | MainLog.Instance.Error("EstateManager: Exception while setting terrain settings: \n" + packet.ToString() + "\n" + ex.ToString()); | 468 | m_log.Error("EstateManager: Exception while setting terrain settings: \n" + packet.ToString() + "\n" + ex.ToString()); |
467 | } | 469 | } |
468 | } | 470 | } |
469 | } | 471 | } |
diff --git a/OpenSim/Region/Environment/LandManagement/LandManager.cs b/OpenSim/Region/Environment/LandManagement/LandManager.cs index c0c1b73..09fa09b 100644 --- a/OpenSim/Region/Environment/LandManagement/LandManager.cs +++ b/OpenSim/Region/Environment/LandManagement/LandManager.cs | |||
@@ -25,6 +25,7 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | |||
28 | using System; | 29 | using System; |
29 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
30 | using Axiom.Math; | 31 | using Axiom.Math; |
@@ -38,7 +39,6 @@ using OpenSim.Region.Physics.Manager; | |||
38 | 39 | ||
39 | namespace OpenSim.Region.Environment.LandManagement | 40 | namespace OpenSim.Region.Environment.LandManagement |
40 | { | 41 | { |
41 | |||
42 | #region LandManager Class | 42 | #region LandManager Class |
43 | 43 | ||
44 | /// <summary> | 44 | /// <summary> |
@@ -46,6 +46,8 @@ namespace OpenSim.Region.Environment.LandManagement | |||
46 | /// </summary> | 46 | /// </summary> |
47 | public class LandManager | 47 | public class LandManager |
48 | { | 48 | { |
49 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
50 | |||
49 | #region Constants | 51 | #region Constants |
50 | 52 | ||
51 | //Land types set with flags in ParcelOverlay. | 53 | //Land types set with flags in ParcelOverlay. |
@@ -57,7 +59,6 @@ namespace OpenSim.Region.Environment.LandManagement | |||
57 | public const byte LAND_TYPE_IS_FOR_SALE = (byte) 4; //Equals 00000100 | 59 | public const byte LAND_TYPE_IS_FOR_SALE = (byte) 4; //Equals 00000100 |
58 | public const byte LAND_TYPE_IS_BEING_AUCTIONED = (byte) 5; //Equals 00000101 | 60 | public const byte LAND_TYPE_IS_BEING_AUCTIONED = (byte) 5; //Equals 00000101 |
59 | 61 | ||
60 | |||
61 | //Flags that when set, a border on the given side will be placed | 62 | //Flags that when set, a border on the given side will be placed |
62 | //NOTE: North and East is assumable by the west and south sides (if land to east has a west border, then I have an east border; etc) | 63 | //NOTE: North and East is assumable by the west and south sides (if land to east has a west border, then I have an east border; etc) |
63 | //This took forever to figure out -- jeesh. /blame LL for even having to send these | 64 | //This took forever to figure out -- jeesh. /blame LL for even having to send these |
@@ -73,7 +74,6 @@ namespace OpenSim.Region.Environment.LandManagement | |||
73 | public const int LAND_SELECT_OBJECTS_GROUP = 4; | 74 | public const int LAND_SELECT_OBJECTS_GROUP = 4; |
74 | public const int LAND_SELECT_OBJECTS_OTHER = 8; | 75 | public const int LAND_SELECT_OBJECTS_OTHER = 8; |
75 | 76 | ||
76 | |||
77 | //These are other constants. Yay! | 77 | //These are other constants. Yay! |
78 | public const int START_LAND_LOCAL_ID = 1; | 78 | public const int START_LAND_LOCAL_ID = 1; |
79 | 79 | ||
@@ -127,7 +127,7 @@ namespace OpenSim.Region.Environment.LandManagement | |||
127 | //} | 127 | //} |
128 | //catch (Exception ex) | 128 | //catch (Exception ex) |
129 | //{ | 129 | //{ |
130 | //MainLog.Instance.Error("LandManager", "IncomingLandObjectsFromStorage: Exception: " + ex.ToString()); | 130 | //m_log.Error("[LandManager]: IncomingLandObjectsFromStorage: Exception: " + ex.ToString()); |
131 | //throw ex; | 131 | //throw ex; |
132 | //} | 132 | //} |
133 | } | 133 | } |
@@ -526,8 +526,7 @@ namespace OpenSim.Region.Environment.LandManagement | |||
526 | } | 526 | } |
527 | catch (Exception e) | 527 | catch (Exception e) |
528 | { | 528 | { |
529 | MainLog.Instance.Debug("LAND", | 529 | m_log.Debug("[LAND]: Skipped Land checks because avatar is out of bounds: " + e.Message); |
530 | "Skipped Land checks because avatar is out of bounds: " + e.Message); | ||
531 | } | 530 | } |
532 | } | 531 | } |
533 | } | 532 | } |
diff --git a/OpenSim/Region/Environment/ModuleLoader.cs b/OpenSim/Region/Environment/ModuleLoader.cs index 76ba14b..d4031d9 100644 --- a/OpenSim/Region/Environment/ModuleLoader.cs +++ b/OpenSim/Region/Environment/ModuleLoader.cs | |||
@@ -40,16 +40,16 @@ namespace OpenSim.Region.Environment | |||
40 | { | 40 | { |
41 | public class ModuleLoader | 41 | public class ModuleLoader |
42 | { | 42 | { |
43 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
44 | |||
43 | public Dictionary<string, Assembly> LoadedAssemblys = new Dictionary<string, Assembly>(); | 45 | public Dictionary<string, Assembly> LoadedAssemblys = new Dictionary<string, Assembly>(); |
44 | 46 | ||
45 | private readonly List<IRegionModule> m_loadedModules = new List<IRegionModule>(); | 47 | private readonly List<IRegionModule> m_loadedModules = new List<IRegionModule>(); |
46 | private readonly Dictionary<string, IRegionModule> m_loadedSharedModules = new Dictionary<string, IRegionModule>(); | 48 | private readonly Dictionary<string, IRegionModule> m_loadedSharedModules = new Dictionary<string, IRegionModule>(); |
47 | private readonly LogBase m_log; | ||
48 | private readonly IConfigSource m_config; | 49 | private readonly IConfigSource m_config; |
49 | 50 | ||
50 | public ModuleLoader(LogBase log, IConfigSource config) | 51 | public ModuleLoader(IConfigSource config) |
51 | { | 52 | { |
52 | m_log = log; | ||
53 | m_config = config; | 53 | m_config = config; |
54 | } | 54 | } |
55 | 55 | ||
@@ -78,7 +78,7 @@ namespace OpenSim.Region.Environment | |||
78 | DynamicTextureModule dynamicModule = new DynamicTextureModule(); | 78 | DynamicTextureModule dynamicModule = new DynamicTextureModule(); |
79 | if (m_loadedSharedModules.ContainsKey(dynamicModule.Name)) | 79 | if (m_loadedSharedModules.ContainsKey(dynamicModule.Name)) |
80 | { | 80 | { |
81 | m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", dynamicModule.Name, "DynamicTextureModule"); | 81 | m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", dynamicModule.Name, "DynamicTextureModule")); |
82 | } | 82 | } |
83 | else | 83 | else |
84 | { | 84 | { |
@@ -88,7 +88,7 @@ namespace OpenSim.Region.Environment | |||
88 | ChatModule chat = new ChatModule(); | 88 | ChatModule chat = new ChatModule(); |
89 | if (m_loadedSharedModules.ContainsKey(chat.Name)) | 89 | if (m_loadedSharedModules.ContainsKey(chat.Name)) |
90 | { | 90 | { |
91 | m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", chat.Name, "ChatModule"); | 91 | m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", chat.Name, "ChatModule")); |
92 | } | 92 | } |
93 | else | 93 | else |
94 | { | 94 | { |
@@ -98,7 +98,7 @@ namespace OpenSim.Region.Environment | |||
98 | InstantMessageModule imMod = new InstantMessageModule(); | 98 | InstantMessageModule imMod = new InstantMessageModule(); |
99 | if (m_loadedSharedModules.ContainsKey(imMod.Name)) | 99 | if (m_loadedSharedModules.ContainsKey(imMod.Name)) |
100 | { | 100 | { |
101 | m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", imMod.Name, "InstantMessageModule"); | 101 | m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", imMod.Name, "InstantMessageModule")); |
102 | } | 102 | } |
103 | else | 103 | else |
104 | { | 104 | { |
@@ -108,7 +108,7 @@ namespace OpenSim.Region.Environment | |||
108 | LoadImageURLModule loadMod = new LoadImageURLModule(); | 108 | LoadImageURLModule loadMod = new LoadImageURLModule(); |
109 | if (m_loadedSharedModules.ContainsKey(loadMod.Name)) | 109 | if (m_loadedSharedModules.ContainsKey(loadMod.Name)) |
110 | { | 110 | { |
111 | m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", loadMod.Name, "LoadImageURLModule"); | 111 | m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", loadMod.Name, "LoadImageURLModule")); |
112 | } | 112 | } |
113 | else | 113 | else |
114 | { | 114 | { |
@@ -118,7 +118,7 @@ namespace OpenSim.Region.Environment | |||
118 | AvatarFactoryModule avatarFactory = new AvatarFactoryModule(); | 118 | AvatarFactoryModule avatarFactory = new AvatarFactoryModule(); |
119 | if (m_loadedSharedModules.ContainsKey(avatarFactory.Name)) | 119 | if (m_loadedSharedModules.ContainsKey(avatarFactory.Name)) |
120 | { | 120 | { |
121 | m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", avatarFactory.Name, "AvarFactoryModule"); | 121 | m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", avatarFactory.Name, "AvarFactoryModule")); |
122 | } | 122 | } |
123 | else | 123 | else |
124 | { | 124 | { |
@@ -128,7 +128,7 @@ namespace OpenSim.Region.Environment | |||
128 | XMLRPCModule xmlRpcMod = new XMLRPCModule(); | 128 | XMLRPCModule xmlRpcMod = new XMLRPCModule(); |
129 | if (m_loadedSharedModules.ContainsKey(xmlRpcMod.Name)) | 129 | if (m_loadedSharedModules.ContainsKey(xmlRpcMod.Name)) |
130 | { | 130 | { |
131 | m_log.Error("MODULES", "Module name \"{0}\" already exists in module list. Module type {1} not added!", xmlRpcMod.Name, "XMLRPCModule"); | 131 | m_log.Error(String.Format("[MODULES]: Module name \"{0}\" already exists in module list. Module type {1} not added!", xmlRpcMod.Name, "XMLRPCModule")); |
132 | } | 132 | } |
133 | else | 133 | else |
134 | { | 134 | { |
@@ -186,17 +186,17 @@ namespace OpenSim.Region.Environment | |||
186 | 186 | ||
187 | if (modules.Length > 0) | 187 | if (modules.Length > 0) |
188 | { | 188 | { |
189 | m_log.Verbose("MODULES", "Found Module Library [{0}]", dllName); | 189 | m_log.Info(String.Format("[MODULES]: Found Module Library [{0}]", dllName)); |
190 | foreach (IRegionModule module in modules) | 190 | foreach (IRegionModule module in modules) |
191 | { | 191 | { |
192 | if (!module.IsSharedModule) | 192 | if (!module.IsSharedModule) |
193 | { | 193 | { |
194 | m_log.Verbose("MODULES", " [{0}]: Initializing.", module.Name); | 194 | m_log.Info(String.Format("[MODULES]: [{0}]: Initializing.", module.Name)); |
195 | InitializeModule(module, scene); | 195 | InitializeModule(module, scene); |
196 | } | 196 | } |
197 | else | 197 | else |
198 | { | 198 | { |
199 | m_log.Verbose("MODULES", " [{0}]: Loading Shared Module.", module.Name); | 199 | m_log.Info(String.Format("[MODULES]: [{0}]: Loading Shared Module.", module.Name)); |
200 | LoadSharedModule(module); | 200 | LoadSharedModule(module); |
201 | } | 201 | } |
202 | } | 202 | } |
@@ -246,7 +246,7 @@ namespace OpenSim.Region.Environment | |||
246 | } | 246 | } |
247 | catch (BadImageFormatException) | 247 | catch (BadImageFormatException) |
248 | { | 248 | { |
249 | //m_log.Verbose("MODULES", "The file [{0}] is not a module assembly.", e.FileName); | 249 | //m_log.Info(String.Format("[MODULES]: The file [{0}] is not a module assembly.", e.FileName)); |
250 | } | 250 | } |
251 | } | 251 | } |
252 | 252 | ||
@@ -270,7 +270,7 @@ namespace OpenSim.Region.Environment | |||
270 | } | 270 | } |
271 | catch (ReflectionTypeLoadException) | 271 | catch (ReflectionTypeLoadException) |
272 | { | 272 | { |
273 | m_log.Verbose("MODULES", "Could not load types for [{0}].", pluginAssembly.FullName); | 273 | m_log.Info(String.Format("[MODULES]: Could not load types for [{0}].", pluginAssembly.FullName)); |
274 | } | 274 | } |
275 | } | 275 | } |
276 | 276 | ||
diff --git a/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs b/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs index 81478a1..d51936b 100644 --- a/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs +++ b/OpenSim/Region/Environment/Modules/BetaGridLikeMoneyModule.cs | |||
@@ -41,8 +41,7 @@ namespace OpenSim.Region.Environment.Modules | |||
41 | { | 41 | { |
42 | public class BetaGridLikeMoneyModule: IRegionModule | 42 | public class BetaGridLikeMoneyModule: IRegionModule |
43 | { | 43 | { |
44 | 44 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | |
45 | private LogBase m_log; | ||
46 | 45 | ||
47 | private Dictionary<ulong,Scene> m_scenel = new Dictionary<ulong,Scene>(); | 46 | private Dictionary<ulong,Scene> m_scenel = new Dictionary<ulong,Scene>(); |
48 | 47 | ||
@@ -66,8 +65,6 @@ namespace OpenSim.Region.Environment.Modules | |||
66 | 65 | ||
67 | public void Initialise(Scene scene, IConfigSource config) | 66 | public void Initialise(Scene scene, IConfigSource config) |
68 | { | 67 | { |
69 | m_log = MainLog.Instance; | ||
70 | |||
71 | m_gConfig = config; | 68 | m_gConfig = config; |
72 | ReadConfigAndPopulate(); | 69 | ReadConfigAndPopulate(); |
73 | 70 | ||
@@ -160,11 +157,8 @@ namespace OpenSim.Region.Environment.Modules | |||
160 | } | 157 | } |
161 | else | 158 | else |
162 | { | 159 | { |
163 | MainLog.Instance.Warn("MONEY", "Potential Fraud Warning, got money transfer request for avatar that isn't in this simulator - Details; Sender:" + e.sender.ToString() + " Reciver: " + e.reciever.ToString() + " Amount: " + e.amount.ToString()); | 160 | m_log.Warn("[MONEY]: Potential Fraud Warning, got money transfer request for avatar that isn't in this simulator - Details; Sender:" + e.sender.ToString() + " Reciver: " + e.reciever.ToString() + " Amount: " + e.amount.ToString()); |
164 | } | 161 | } |
165 | |||
166 | |||
167 | |||
168 | } | 162 | } |
169 | 163 | ||
170 | private bool doMoneyTranfer(LLUUID Sender, LLUUID Receiver, int amount) | 164 | private bool doMoneyTranfer(LLUUID Sender, LLUUID Receiver, int amount) |
diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs index 749a923..82bd2ec 100644 --- a/OpenSim/Region/Environment/Modules/ChatModule.cs +++ b/OpenSim/Region/Environment/Modules/ChatModule.cs | |||
@@ -43,8 +43,9 @@ namespace OpenSim.Region.Environment.Modules | |||
43 | { | 43 | { |
44 | public class ChatModule : IRegionModule, ISimChat | 44 | public class ChatModule : IRegionModule, ISimChat |
45 | { | 45 | { |
46 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
47 | |||
46 | private List<Scene> m_scenes = new List<Scene>(); | 48 | private List<Scene> m_scenes = new List<Scene>(); |
47 | private LogBase m_log; | ||
48 | 49 | ||
49 | private int m_whisperdistance = 10; | 50 | private int m_whisperdistance = 10; |
50 | private int m_saydistance = 30; | 51 | private int m_saydistance = 30; |
@@ -59,11 +60,6 @@ namespace OpenSim.Region.Environment.Modules | |||
59 | internal object m_syncLogout = new object(); | 60 | internal object m_syncLogout = new object(); |
60 | private Thread m_irc_connector=null; | 61 | private Thread m_irc_connector=null; |
61 | 62 | ||
62 | public ChatModule() | ||
63 | { | ||
64 | m_log = MainLog.Instance; | ||
65 | } | ||
66 | |||
67 | public void Initialise(Scene scene, IConfigSource config) | 63 | public void Initialise(Scene scene, IConfigSource config) |
68 | { | 64 | { |
69 | lock (m_syncInit) | 65 | lock (m_syncInit) |
@@ -159,7 +155,7 @@ namespace OpenSim.Region.Environment.Modules | |||
159 | } | 155 | } |
160 | catch (Exception ex) | 156 | catch (Exception ex) |
161 | { | 157 | { |
162 | m_log.Error("IRC", "NewClient exception trap:" + ex.ToString()); | 158 | m_log.Error("[IRC]: NewClient exception trap:" + ex.ToString()); |
163 | } | 159 | } |
164 | } | 160 | } |
165 | 161 | ||
@@ -180,13 +176,13 @@ namespace OpenSim.Region.Environment.Modules | |||
180 | { | 176 | { |
181 | m_last_leaving_user = clientName; | 177 | m_last_leaving_user = clientName; |
182 | m_irc.PrivMsg(m_irc.Nick, "Sim", "notices " + clientName + " left " + clientRegion); | 178 | m_irc.PrivMsg(m_irc.Nick, "Sim", "notices " + clientName + " left " + clientRegion); |
183 | m_log.Verbose("IRC", "IRC watcher notices " + clientName + " left " + clientRegion); | 179 | m_log.Info("[IRC]: IRC watcher notices " + clientName + " left " + clientRegion); |
184 | } | 180 | } |
185 | } | 181 | } |
186 | } | 182 | } |
187 | catch (Exception ex) | 183 | catch (Exception ex) |
188 | { | 184 | { |
189 | m_log.Error("IRC", "ClientLoggedOut exception trap:" + ex.ToString()); | 185 | m_log.Error("[IRC]: ClientLoggedOut exception trap:" + ex.ToString()); |
190 | } | 186 | } |
191 | } | 187 | } |
192 | 188 | ||
@@ -319,6 +315,8 @@ namespace OpenSim.Region.Environment.Modules | |||
319 | 315 | ||
320 | internal class IRCChatModule | 316 | internal class IRCChatModule |
321 | { | 317 | { |
318 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
319 | |||
322 | private string m_server = null; | 320 | private string m_server = null; |
323 | private uint m_port = 6668; | 321 | private uint m_port = 6668; |
324 | private string m_user = "USER OpenSimBot 8 * :I'm a OpenSim to irc bot"; | 322 | private string m_user = "USER OpenSimBot 8 * :I'm a OpenSim to irc bot"; |
@@ -341,7 +339,6 @@ namespace OpenSim.Region.Environment.Modules | |||
341 | 339 | ||
342 | private List<Scene> m_scenes = null; | 340 | private List<Scene> m_scenes = null; |
343 | private List<Scene> m_last_scenes = null; | 341 | private List<Scene> m_last_scenes = null; |
344 | private LogBase m_log; | ||
345 | 342 | ||
346 | public IRCChatModule(IConfigSource config) | 343 | public IRCChatModule(IConfigSource config) |
347 | { | 344 | { |
@@ -388,9 +385,8 @@ namespace OpenSim.Region.Environment.Modules | |||
388 | } | 385 | } |
389 | catch (Exception) | 386 | catch (Exception) |
390 | { | 387 | { |
391 | MainLog.Instance.Verbose("CHAT", "No IRC config information, skipping IRC bridge configuration"); | 388 | m_log.Info("[CHAT]: No IRC config information, skipping IRC bridge configuration"); |
392 | } | 389 | } |
393 | m_log = MainLog.Instance; | ||
394 | } | 390 | } |
395 | 391 | ||
396 | public bool Connect(List<Scene> scenes) | 392 | public bool Connect(List<Scene> scenes) |
@@ -404,9 +400,9 @@ namespace OpenSim.Region.Environment.Modules | |||
404 | if (m_last_scenes == null) { m_last_scenes = scenes; } | 400 | if (m_last_scenes == null) { m_last_scenes = scenes; } |
405 | 401 | ||
406 | m_tcp = new TcpClient(m_server, (int)m_port); | 402 | m_tcp = new TcpClient(m_server, (int)m_port); |
407 | m_log.Verbose("IRC", "Connecting..."); | 403 | m_log.Info("[IRC]: Connecting..."); |
408 | m_stream = m_tcp.GetStream(); | 404 | m_stream = m_tcp.GetStream(); |
409 | m_log.Verbose("IRC", "Connected to " + m_server); | 405 | m_log.Info("[IRC]: Connected to " + m_server); |
410 | m_reader = new StreamReader(m_stream); | 406 | m_reader = new StreamReader(m_stream); |
411 | m_writer = new StreamWriter(m_stream); | 407 | m_writer = new StreamWriter(m_stream); |
412 | 408 | ||
@@ -422,7 +418,7 @@ namespace OpenSim.Region.Environment.Modules | |||
422 | m_writer.Flush(); | 418 | m_writer.Flush(); |
423 | m_writer.WriteLine("JOIN " + m_channel); | 419 | m_writer.WriteLine("JOIN " + m_channel); |
424 | m_writer.Flush(); | 420 | m_writer.Flush(); |
425 | m_log.Verbose("IRC", "Connection fully established"); | 421 | m_log.Info("[IRC]: Connection fully established"); |
426 | m_connected = true; | 422 | m_connected = true; |
427 | } | 423 | } |
428 | catch (Exception e) | 424 | catch (Exception e) |
@@ -475,16 +471,16 @@ namespace OpenSim.Region.Environment.Modules | |||
475 | m_writer.WriteLine(m_privmsgformat, m_channel, from, region, msg); | 471 | m_writer.WriteLine(m_privmsgformat, m_channel, from, region, msg); |
476 | } | 472 | } |
477 | m_writer.Flush(); | 473 | m_writer.Flush(); |
478 | m_log.Verbose("IRC", "PrivMsg " + from + " in " + region + " :" + msg); | 474 | m_log.Info("[IRC]: PrivMsg " + from + " in " + region + " :" + msg); |
479 | } | 475 | } |
480 | catch (IOException) | 476 | catch (IOException) |
481 | { | 477 | { |
482 | m_log.Error("IRC", "Disconnected from IRC server.(PrivMsg)"); | 478 | m_log.Error("[IRC]: Disconnected from IRC server.(PrivMsg)"); |
483 | Reconnect(); | 479 | Reconnect(); |
484 | } | 480 | } |
485 | catch (Exception ex) | 481 | catch (Exception ex) |
486 | { | 482 | { |
487 | m_log.Error("IRC", "PrivMsg exception trap:" + ex.ToString()); | 483 | m_log.Error("[IRC]: PrivMsg exception trap:" + ex.ToString()); |
488 | } | 484 | } |
489 | } | 485 | } |
490 | 486 | ||
@@ -493,7 +489,7 @@ namespace OpenSim.Region.Environment.Modules | |||
493 | //examines IRC commands and extracts any private messages | 489 | //examines IRC commands and extracts any private messages |
494 | // which will then be reboadcast in the Sim | 490 | // which will then be reboadcast in the Sim |
495 | 491 | ||
496 | m_log.Verbose("IRC", "ExtractMsg: " + input); | 492 | m_log.Info("[IRC]: ExtractMsg: " + input); |
497 | Dictionary<string, string> result = null; | 493 | Dictionary<string, string> result = null; |
498 | //string regex = @":(?<nick>\w*)!~(?<user>\S*) PRIVMSG (?<channel>\S+) :(?<msg>.*)"; | 494 | //string regex = @":(?<nick>\w*)!~(?<user>\S*) PRIVMSG (?<channel>\S+) :(?<msg>.*)"; |
499 | string regex = @":(?<nick>\w*)!(?<user>\S*) PRIVMSG (?<channel>\S+) :(?<msg>.*)"; | 495 | string regex = @":(?<nick>\w*)!(?<user>\S*) PRIVMSG (?<channel>\S+) :(?<msg>.*)"; |
@@ -510,10 +506,10 @@ namespace OpenSim.Region.Environment.Modules | |||
510 | } | 506 | } |
511 | else | 507 | else |
512 | { | 508 | { |
513 | m_log.Verbose("IRC", "Number of matches: " + matches.Count); | 509 | m_log.Info("[IRC]: Number of matches: " + matches.Count); |
514 | if (matches.Count > 0) | 510 | if (matches.Count > 0) |
515 | { | 511 | { |
516 | m_log.Verbose("IRC", "Number of groups: " + matches[0].Groups.Count); | 512 | m_log.Info("[IRC]: Number of groups: " + matches[0].Groups.Count); |
517 | } | 513 | } |
518 | } | 514 | } |
519 | return result; | 515 | return result; |
@@ -536,12 +532,12 @@ namespace OpenSim.Region.Environment.Modules | |||
536 | } | 532 | } |
537 | catch (IOException) | 533 | catch (IOException) |
538 | { | 534 | { |
539 | m_log.Error("IRC", "Disconnected from IRC server.(PingRun)"); | 535 | m_log.Error("[IRC]: Disconnected from IRC server.(PingRun)"); |
540 | Reconnect(); | 536 | Reconnect(); |
541 | } | 537 | } |
542 | catch (Exception ex) | 538 | catch (Exception ex) |
543 | { | 539 | { |
544 | m_log.Error("IRC", "PingRun exception trap:" + ex.ToString() + "\n" + ex.StackTrace); | 540 | m_log.Error("[IRC]: PingRun exception trap:" + ex.ToString() + "\n" + ex.StackTrace); |
545 | } | 541 | } |
546 | } | 542 | } |
547 | } | 543 | } |
@@ -552,29 +548,29 @@ namespace OpenSim.Region.Environment.Modules | |||
552 | LLVector3 pos = new LLVector3(128, 128, 20); | 548 | LLVector3 pos = new LLVector3(128, 128, 20); |
553 | while (true) | 549 | while (true) |
554 | { | 550 | { |
555 | try | 551 | try |
556 | { | ||
557 | while ((m_connected == true) && ((inputLine = m_reader.ReadLine()) != null)) | ||
558 | { | 552 | { |
553 | while ((m_connected == true) && ((inputLine = m_reader.ReadLine()) != null)) | ||
554 | { | ||
559 | // Console.WriteLine(inputLine); | 555 | // Console.WriteLine(inputLine); |
560 | if (inputLine.Contains(m_channel)) | 556 | if (inputLine.Contains(m_channel)) |
561 | { | 557 | { |
562 | Dictionary<string, string> data = ExtractMsg(inputLine); | 558 | Dictionary<string, string> data = ExtractMsg(inputLine); |
563 | // Any chat ??? | 559 | // Any chat ??? |
564 | if (data != null) | 560 | if (data != null) |
565 | { | 561 | { |
566 | foreach (Scene m_scene in m_scenes) | 562 | foreach (Scene m_scene in m_scenes) |
567 | { | 563 | { |
568 | m_scene.ForEachScenePresence(delegate(ScenePresence avatar) | 564 | m_scene.ForEachScenePresence(delegate(ScenePresence avatar) |
565 | { | ||
566 | if (!avatar.IsChildAgent) | ||
569 | { | 567 | { |
570 | if (!avatar.IsChildAgent) | 568 | avatar.ControllingClient.SendChatMessage( |
571 | { | 569 | Helpers.StringToField(data["msg"]), 255, |
572 | avatar.ControllingClient.SendChatMessage( | 570 | pos, data["nick"], |
573 | Helpers.StringToField(data["msg"]), 255, | 571 | LLUUID.Zero); |
574 | pos, data["nick"], | 572 | } |
575 | LLUUID.Zero); | 573 | }); |
576 | } | ||
577 | }); | ||
578 | } | 574 | } |
579 | 575 | ||
580 | 576 | ||
@@ -584,24 +580,24 @@ namespace OpenSim.Region.Environment.Modules | |||
584 | // Was an command from the IRC server | 580 | // Was an command from the IRC server |
585 | ProcessIRCCommand(inputLine); | 581 | ProcessIRCCommand(inputLine); |
586 | } | 582 | } |
587 | } | 583 | } |
588 | else | 584 | else |
589 | { | 585 | { |
590 | // Was an command from the IRC server | 586 | // Was an command from the IRC server |
591 | ProcessIRCCommand(inputLine); | 587 | ProcessIRCCommand(inputLine); |
592 | } | 588 | } |
593 | Thread.Sleep(150); | 589 | Thread.Sleep(150); |
594 | } | ||
595 | } | ||
596 | catch (IOException) | ||
597 | { | ||
598 | m_log.Error("IRC", "ListenerRun IOException. Disconnected from IRC server ??? (ListenerRun)"); | ||
599 | Reconnect(); | ||
600 | } | ||
601 | catch (Exception ex) | ||
602 | { | ||
603 | m_log.Error("IRC", "ListenerRun exception trap:" + ex.ToString()+"\n"+ex.StackTrace); | ||
604 | } | 590 | } |
591 | } | ||
592 | catch (IOException) | ||
593 | { | ||
594 | m_log.Error("[IRC]: ListenerRun IOException. Disconnected from IRC server ??? (ListenerRun)"); | ||
595 | Reconnect(); | ||
596 | } | ||
597 | catch (Exception ex) | ||
598 | { | ||
599 | m_log.Error("[IRC]: ListenerRun exception trap:" + ex.ToString() + "\n" + ex.StackTrace); | ||
600 | } | ||
605 | } | 601 | } |
606 | } | 602 | } |
607 | 603 | ||
@@ -626,27 +622,27 @@ namespace OpenSim.Region.Environment.Modules | |||
626 | } | 622 | } |
627 | catch (Exception ex) // IRC gate should not crash Sim | 623 | catch (Exception ex) // IRC gate should not crash Sim |
628 | { | 624 | { |
629 | m_log.Error("IRC", "BroadcastSim Exception Trap:" + ex.ToString() + "\n" + ex.StackTrace); | 625 | m_log.Error("[IRC]: BroadcastSim Exception Trap:" + ex.ToString() + "\n" + ex.StackTrace); |
630 | 626 | ||
631 | } | 627 | } |
632 | |||
633 | |||
634 | } | 628 | } |
629 | |||
635 | public enum ErrorReplies | 630 | public enum ErrorReplies |
636 | { | 631 | { |
637 | NotRegistered = 451, // ":You have not registered" | 632 | NotRegistered = 451, // ":You have not registered" |
638 | NicknameInUse = 433 // "<nick> :Nickname is already in use" | 633 | NicknameInUse = 433 // "<nick> :Nickname is already in use" |
639 | } | 634 | } |
635 | |||
640 | public enum Replies | 636 | public enum Replies |
641 | { | 637 | { |
642 | MotdStart = 375, // ":- <server> Message of the day - " | 638 | MotdStart = 375, // ":- <server> Message of the day - " |
643 | Motd = 372, // ":- <text>" | 639 | Motd = 372, // ":- <text>" |
644 | EndOfMotd = 376 // ":End of /MOTD command" | 640 | EndOfMotd = 376 // ":End of /MOTD command" |
645 | |||
646 | } | 641 | } |
642 | |||
647 | public void ProcessIRCCommand(string command) | 643 | public void ProcessIRCCommand(string command) |
648 | { | 644 | { |
649 | //m_log.Verbose("IRC", "ProcessIRCCommand:"+command); | 645 | //m_log.Info("[IRC]: ProcessIRCCommand:" + command); |
650 | 646 | ||
651 | string[] commArgs = new string[command.Split(' ').Length]; | 647 | string[] commArgs = new string[command.Split(' ').Length]; |
652 | string c_server = m_server; | 648 | string c_server = m_server; |
@@ -656,6 +652,7 @@ namespace OpenSim.Region.Environment.Modules | |||
656 | { | 652 | { |
657 | commArgs[0] = commArgs[0].Remove(0, 1); | 653 | commArgs[0] = commArgs[0].Remove(0, 1); |
658 | } | 654 | } |
655 | |||
659 | if (commArgs[1] == "002") | 656 | if (commArgs[1] == "002") |
660 | { | 657 | { |
661 | // fetch the correct servername | 658 | // fetch the correct servername |
@@ -668,7 +665,7 @@ namespace OpenSim.Region.Environment.Modules | |||
668 | 665 | ||
669 | if (commArgs[0] == "ERROR") | 666 | if (commArgs[0] == "ERROR") |
670 | { | 667 | { |
671 | m_log.Error("IRC", "IRC SERVER ERROR:" + command); | 668 | m_log.Error("[IRC]: IRC SERVER ERROR:" + command); |
672 | } | 669 | } |
673 | 670 | ||
674 | if (commArgs[0] == "PING") | 671 | if (commArgs[0] == "PING") |
@@ -695,7 +692,7 @@ namespace OpenSim.Region.Environment.Modules | |||
695 | case (int)ErrorReplies.NicknameInUse: | 692 | case (int)ErrorReplies.NicknameInUse: |
696 | // Gen a new name | 693 | // Gen a new name |
697 | m_nick = m_basenick + Util.RandomClass.Next(1, 99); | 694 | m_nick = m_basenick + Util.RandomClass.Next(1, 99); |
698 | m_log.Error("IRC", "IRC SERVER reports NicknameInUse, trying " + m_nick); | 695 | m_log.Error("[IRC]: IRC SERVER reports NicknameInUse, trying " + m_nick); |
699 | // Retry | 696 | // Retry |
700 | m_writer.WriteLine("NICK " + m_nick); | 697 | m_writer.WriteLine("NICK " + m_nick); |
701 | m_writer.Flush(); | 698 | m_writer.Flush(); |
diff --git a/OpenSim/Region/Environment/Modules/FriendsModule.cs b/OpenSim/Region/Environment/Modules/FriendsModule.cs index fec28a8..3c324a4 100644 --- a/OpenSim/Region/Environment/Modules/FriendsModule.cs +++ b/OpenSim/Region/Environment/Modules/FriendsModule.cs | |||
@@ -40,8 +40,7 @@ namespace OpenSim.Region.Environment.Modules | |||
40 | { | 40 | { |
41 | public class FriendsModule : IRegionModule | 41 | public class FriendsModule : IRegionModule |
42 | { | 42 | { |
43 | 43 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | |
44 | private LogBase m_log; | ||
45 | 44 | ||
46 | private Scene m_scene; | 45 | private Scene m_scene; |
47 | 46 | ||
@@ -49,7 +48,6 @@ namespace OpenSim.Region.Environment.Modules | |||
49 | 48 | ||
50 | public void Initialise(Scene scene, IConfigSource config) | 49 | public void Initialise(Scene scene, IConfigSource config) |
51 | { | 50 | { |
52 | m_log = MainLog.Instance; | ||
53 | m_scene = scene; | 51 | m_scene = scene; |
54 | scene.EventManager.OnNewClient += OnNewClient; | 52 | scene.EventManager.OnNewClient += OnNewClient; |
55 | scene.EventManager.OnGridInstantMessageToFriendsModule += OnGridInstantMessage; | 53 | scene.EventManager.OnGridInstantMessageToFriendsModule += OnGridInstantMessage; |
@@ -72,6 +70,7 @@ namespace OpenSim.Region.Environment.Modules | |||
72 | 70 | ||
73 | 71 | ||
74 | } | 72 | } |
73 | |||
75 | private void OnInstantMessage(IClientAPI client,LLUUID fromAgentID, | 74 | private void OnInstantMessage(IClientAPI client,LLUUID fromAgentID, |
76 | LLUUID fromAgentSession, LLUUID toAgentID, | 75 | LLUUID fromAgentSession, LLUUID toAgentID, |
77 | LLUUID imSessionID, uint timestamp, string fromAgentName, | 76 | LLUUID imSessionID, uint timestamp, string fromAgentName, |
@@ -89,13 +88,13 @@ namespace OpenSim.Region.Environment.Modules | |||
89 | 88 | ||
90 | m_pendingFriendRequests.Add(friendTransactionID, fromAgentID); | 89 | m_pendingFriendRequests.Add(friendTransactionID, fromAgentID); |
91 | 90 | ||
92 | m_log.Verbose("FRIEND", "38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message); | 91 | m_log.Info("[FRIEND]: 38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message); |
93 | GridInstantMessage msg = new GridInstantMessage(); | 92 | GridInstantMessage msg = new GridInstantMessage(); |
94 | msg.fromAgentID = fromAgentID.UUID; | 93 | msg.fromAgentID = fromAgentID.UUID; |
95 | msg.fromAgentSession = fromAgentSession.UUID; | 94 | msg.fromAgentSession = fromAgentSession.UUID; |
96 | msg.toAgentID = toAgentID.UUID; | 95 | msg.toAgentID = toAgentID.UUID; |
97 | msg.imSessionID = friendTransactionID.UUID; // This is the item we're mucking with here | 96 | msg.imSessionID = friendTransactionID.UUID; // This is the item we're mucking with here |
98 | m_log.Verbose("FRIEND","Filling Session: " + msg.imSessionID.ToString()); | 97 | m_log.Info("[FRIEND]: Filling Session: " + msg.imSessionID.ToString()); |
99 | msg.timestamp = timestamp; | 98 | msg.timestamp = timestamp; |
100 | if (client != null) | 99 | if (client != null) |
101 | { | 100 | { |
@@ -115,20 +114,18 @@ namespace OpenSim.Region.Environment.Modules | |||
115 | msg.binaryBucket = binaryBucket; | 114 | msg.binaryBucket = binaryBucket; |
116 | m_scene.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); | 115 | m_scene.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); |
117 | } | 116 | } |
117 | |||
118 | // 39 == Accept Friendship | ||
118 | if (dialog == (byte)39) | 119 | if (dialog == (byte)39) |
119 | { | 120 | { |
120 | m_log.Verbose("FRIEND", "38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message); | 121 | m_log.Info("[FRIEND]: 39 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message); |
121 | |||
122 | } | 122 | } |
123 | |||
124 | // 40 == Decline Friendship | ||
123 | if (dialog == (byte)40) | 125 | if (dialog == (byte)40) |
124 | { | 126 | { |
125 | m_log.Verbose("FRIEND", "38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message); | 127 | m_log.Info("[FRIEND]: 40 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + message); |
126 | } | 128 | } |
127 | |||
128 | // 39 == Accept Friendship | ||
129 | |||
130 | // 40 == Decline Friendship | ||
131 | |||
132 | } | 129 | } |
133 | 130 | ||
134 | private void OnApprovedFriendRequest(IClientAPI client, LLUUID agentID, LLUUID transactionID, List<LLUUID> callingCardFolders) | 131 | private void OnApprovedFriendRequest(IClientAPI client, LLUUID agentID, LLUUID transactionID, List<LLUUID> callingCardFolders) |
@@ -160,6 +157,7 @@ namespace OpenSim.Region.Environment.Modules | |||
160 | // TODO: Inform agent that the friend is online | 157 | // TODO: Inform agent that the friend is online |
161 | } | 158 | } |
162 | } | 159 | } |
160 | |||
163 | private void OnDenyFriendRequest(IClientAPI client, LLUUID agentID, LLUUID transactionID, List<LLUUID> callingCardFolders) | 161 | private void OnDenyFriendRequest(IClientAPI client, LLUUID agentID, LLUUID transactionID, List<LLUUID> callingCardFolders) |
164 | { | 162 | { |
165 | if (m_pendingFriendRequests.ContainsKey(transactionID)) | 163 | if (m_pendingFriendRequests.ContainsKey(transactionID)) |
@@ -184,20 +182,15 @@ namespace OpenSim.Region.Environment.Modules | |||
184 | msg.binaryBucket = new byte[0]; | 182 | msg.binaryBucket = new byte[0]; |
185 | m_scene.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); | 183 | m_scene.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); |
186 | m_pendingFriendRequests.Remove(transactionID); | 184 | m_pendingFriendRequests.Remove(transactionID); |
187 | |||
188 | } | 185 | } |
189 | |||
190 | |||
191 | } | 186 | } |
192 | 187 | ||
193 | private void OnTerminateFriendship(IClientAPI client, LLUUID agent, LLUUID exfriendID) | 188 | private void OnTerminateFriendship(IClientAPI client, LLUUID agent, LLUUID exfriendID) |
194 | { | 189 | { |
195 | m_scene.StoreRemoveFriendship(agent, exfriendID); | 190 | m_scene.StoreRemoveFriendship(agent, exfriendID); |
196 | // TODO: Inform the client that the ExFriend is offline | 191 | // TODO: Inform the client that the ExFriend is offline |
197 | |||
198 | } | 192 | } |
199 | 193 | ||
200 | |||
201 | private void OnGridInstantMessage(GridInstantMessage msg) | 194 | private void OnGridInstantMessage(GridInstantMessage msg) |
202 | { | 195 | { |
203 | // Trigger the above event handler | 196 | // Trigger the above event handler |
@@ -206,16 +199,12 @@ namespace OpenSim.Region.Environment.Modules | |||
206 | msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID, | 199 | msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID, |
207 | new LLVector3(msg.Position.x, msg.Position.y, msg.Position.z), new LLUUID(msg.RegionID), | 200 | new LLVector3(msg.Position.x, msg.Position.y, msg.Position.z), new LLUUID(msg.RegionID), |
208 | msg.binaryBucket); | 201 | msg.binaryBucket); |
209 | |||
210 | } | 202 | } |
211 | 203 | ||
212 | |||
213 | public void PostInitialise() | 204 | public void PostInitialise() |
214 | { | 205 | { |
215 | } | 206 | } |
216 | 207 | ||
217 | |||
218 | |||
219 | public void Close() | 208 | public void Close() |
220 | { | 209 | { |
221 | } | 210 | } |
@@ -230,4 +219,4 @@ namespace OpenSim.Region.Environment.Modules | |||
230 | get { return false; } | 219 | get { return false; } |
231 | } | 220 | } |
232 | } | 221 | } |
233 | } \ No newline at end of file | 222 | } |
diff --git a/OpenSim/Region/Environment/Modules/InstantMessageModule.cs b/OpenSim/Region/Environment/Modules/InstantMessageModule.cs index f5eb052..e0b3138 100644 --- a/OpenSim/Region/Environment/Modules/InstantMessageModule.cs +++ b/OpenSim/Region/Environment/Modules/InstantMessageModule.cs | |||
@@ -39,12 +39,6 @@ namespace OpenSim.Region.Environment.Modules | |||
39 | public class InstantMessageModule : IRegionModule | 39 | public class InstantMessageModule : IRegionModule |
40 | { | 40 | { |
41 | private List<Scene> m_scenes = new List<Scene>(); | 41 | private List<Scene> m_scenes = new List<Scene>(); |
42 | private LogBase m_log; | ||
43 | |||
44 | public InstantMessageModule() | ||
45 | { | ||
46 | m_log = MainLog.Instance; | ||
47 | } | ||
48 | 42 | ||
49 | public void Initialise(Scene scene, IConfigSource config) | 43 | public void Initialise(Scene scene, IConfigSource config) |
50 | { | 44 | { |
@@ -68,7 +62,6 @@ namespace OpenSim.Region.Environment.Modules | |||
68 | uint ParentEstateID, LLVector3 Position, LLUUID RegionID, | 62 | uint ParentEstateID, LLVector3 Position, LLUUID RegionID, |
69 | byte[] binaryBucket) | 63 | byte[] binaryBucket) |
70 | { | 64 | { |
71 | |||
72 | bool FriendDialog = ((dialog == (byte)38) || (dialog == (byte)39) || (dialog == (byte)40)); | 65 | bool FriendDialog = ((dialog == (byte)38) || (dialog == (byte)39) || (dialog == (byte)40)); |
73 | 66 | ||
74 | // IM dialogs need to be pre-processed and have their sessionID filled by the server | 67 | // IM dialogs need to be pre-processed and have their sessionID filled by the server |
diff --git a/OpenSim/Region/Environment/Modules/SunModule.cs b/OpenSim/Region/Environment/Modules/SunModule.cs index bd6cd63..d2572c0 100644 --- a/OpenSim/Region/Environment/Modules/SunModule.cs +++ b/OpenSim/Region/Environment/Modules/SunModule.cs | |||
@@ -39,6 +39,8 @@ namespace OpenSim.Region.Environment.Modules | |||
39 | { | 39 | { |
40 | public class SunModule : IRegionModule | 40 | public class SunModule : IRegionModule |
41 | { | 41 | { |
42 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
43 | |||
42 | private const double m_real_day = 24.0; | 44 | private const double m_real_day = 24.0; |
43 | private const int m_default_frame = 100; | 45 | private const int m_default_frame = 100; |
44 | private int m_frame_mod; | 46 | private int m_frame_mod; |
@@ -48,7 +50,6 @@ namespace OpenSim.Region.Environment.Modules | |||
48 | private long m_start; | 50 | private long m_start; |
49 | 51 | ||
50 | private Scene m_scene; | 52 | private Scene m_scene; |
51 | private LogBase m_log; | ||
52 | 53 | ||
53 | public void Initialise(Scene scene, IConfigSource config) | 54 | public void Initialise(Scene scene, IConfigSource config) |
54 | { | 55 | { |
@@ -69,7 +70,6 @@ namespace OpenSim.Region.Environment.Modules | |||
69 | 70 | ||
70 | m_dilation = (int) (m_real_day/m_day_length); | 71 | m_dilation = (int) (m_real_day/m_day_length); |
71 | m_scene = scene; | 72 | m_scene = scene; |
72 | m_log = MainLog.Instance; | ||
73 | scene.EventManager.OnFrame += SunUpdate; | 73 | scene.EventManager.OnFrame += SunUpdate; |
74 | scene.EventManager.OnNewClient += SunToClient; | 74 | scene.EventManager.OnNewClient += SunToClient; |
75 | } | 75 | } |
@@ -104,7 +104,7 @@ namespace OpenSim.Region.Environment.Modules | |||
104 | m_frame++; | 104 | m_frame++; |
105 | return; | 105 | return; |
106 | } | 106 | } |
107 | // m_log.Verbose("SUN","I've got an update {0} => {1}", m_scene.RegionsInfo.RegionName, HourOfTheDay()); | 107 | // m_log.Info("[SUN]: I've got an update {0} => {1}", m_scene.RegionsInfo.RegionName, HourOfTheDay()); |
108 | List<ScenePresence> avatars = m_scene.GetAvatars(); | 108 | List<ScenePresence> avatars = m_scene.GetAvatars(); |
109 | foreach (ScenePresence avatar in avatars) | 109 | foreach (ScenePresence avatar in avatars) |
110 | { | 110 | { |
@@ -191,4 +191,4 @@ namespace OpenSim.Region.Environment.Modules | |||
191 | // // OutPacket(viewertime); | 191 | // // OutPacket(viewertime); |
192 | // } | 192 | // } |
193 | } | 193 | } |
194 | } \ No newline at end of file | 194 | } |
diff --git a/OpenSim/Region/Environment/Modules/TextureSender.cs b/OpenSim/Region/Environment/Modules/TextureSender.cs index a533078..053a558 100644 --- a/OpenSim/Region/Environment/Modules/TextureSender.cs +++ b/OpenSim/Region/Environment/Modules/TextureSender.cs | |||
@@ -36,6 +36,8 @@ namespace OpenSim.Region.Environment.Modules | |||
36 | { | 36 | { |
37 | public class TextureSender | 37 | public class TextureSender |
38 | { | 38 | { |
39 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
40 | |||
39 | public int counter = 0; | 41 | public int counter = 0; |
40 | private AssetBase m_asset; | 42 | private AssetBase m_asset; |
41 | public long DataPointer = 0; | 43 | public long DataPointer = 0; |
@@ -135,9 +137,8 @@ namespace OpenSim.Region.Environment.Modules | |||
135 | } | 137 | } |
136 | catch (ArgumentOutOfRangeException) | 138 | catch (ArgumentOutOfRangeException) |
137 | { | 139 | { |
138 | MainLog.Instance.Error("TEXTURE", | 140 | m_log.Error("[TEXTURE]: Unable to separate texture into multiple packets: Array bounds failure on asset:" + |
139 | "Unable to separate texture into multiple packets: Array bounds failure on asset:" + | 141 | m_asset.FullID.ToString() ); |
140 | m_asset.FullID.ToString() ); | ||
141 | return; | 142 | return; |
142 | } | 143 | } |
143 | RequestUser.OutPacket(im, ThrottleOutPacketType.Texture); | 144 | RequestUser.OutPacket(im, ThrottleOutPacketType.Texture); |
diff --git a/OpenSim/Region/Environment/Modules/XMLRPCModule.cs b/OpenSim/Region/Environment/Modules/XMLRPCModule.cs index 76c6a53..762e76d 100644 --- a/OpenSim/Region/Environment/Modules/XMLRPCModule.cs +++ b/OpenSim/Region/Environment/Modules/XMLRPCModule.cs | |||
@@ -75,6 +75,8 @@ namespace OpenSim.Region.Environment.Modules | |||
75 | { | 75 | { |
76 | public class XMLRPCModule : IRegionModule, IXMLRPC | 76 | public class XMLRPCModule : IRegionModule, IXMLRPC |
77 | { | 77 | { |
78 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
79 | |||
78 | private Scene m_scene; | 80 | private Scene m_scene; |
79 | private Queue<RPCRequestInfo> rpcQueue = new Queue<RPCRequestInfo>(); | 81 | private Queue<RPCRequestInfo> rpcQueue = new Queue<RPCRequestInfo>(); |
80 | private object XMLRPCListLock = new object(); | 82 | private object XMLRPCListLock = new object(); |
@@ -83,7 +85,6 @@ namespace OpenSim.Region.Environment.Modules | |||
83 | private int RemoteReplyScriptTimeout = 900; | 85 | private int RemoteReplyScriptTimeout = 900; |
84 | private int m_remoteDataPort = 0; | 86 | private int m_remoteDataPort = 0; |
85 | private List<Scene> m_scenes = new List<Scene>(); | 87 | private List<Scene> m_scenes = new List<Scene>(); |
86 | private LogBase m_log; | ||
87 | 88 | ||
88 | // <channel id, RPCChannelInfo> | 89 | // <channel id, RPCChannelInfo> |
89 | private Dictionary<LLUUID, RPCChannelInfo> m_openChannels; | 90 | private Dictionary<LLUUID, RPCChannelInfo> m_openChannels; |
@@ -91,11 +92,6 @@ namespace OpenSim.Region.Environment.Modules | |||
91 | // <channel id, RPCRequestInfo> | 92 | // <channel id, RPCRequestInfo> |
92 | private Dictionary<LLUUID, RPCRequestInfo> m_pendingResponse; | 93 | private Dictionary<LLUUID, RPCRequestInfo> m_pendingResponse; |
93 | 94 | ||
94 | public XMLRPCModule() | ||
95 | { | ||
96 | m_log = MainLog.Instance; | ||
97 | } | ||
98 | |||
99 | public void Initialise(Scene scene, IConfigSource config) | 95 | public void Initialise(Scene scene, IConfigSource config) |
100 | { | 96 | { |
101 | try | 97 | try |
@@ -123,8 +119,8 @@ namespace OpenSim.Region.Environment.Modules | |||
123 | 119 | ||
124 | // Start http server | 120 | // Start http server |
125 | // Attach xmlrpc handlers | 121 | // Attach xmlrpc handlers |
126 | m_log.Verbose("REMOTE_DATA", | 122 | m_log.Info("[REMOTE_DATA]: " + |
127 | "Starting XMLRPC Server on port " + m_remoteDataPort + " for llRemoteData commands."); | 123 | "Starting XMLRPC Server on port " + m_remoteDataPort + " for llRemoteData commands."); |
128 | BaseHttpServer httpServer = new BaseHttpServer((uint) m_remoteDataPort); | 124 | BaseHttpServer httpServer = new BaseHttpServer((uint) m_remoteDataPort); |
129 | httpServer.AddXmlRPCHandler("llRemoteData", XmlRpcRemoteData); | 125 | httpServer.AddXmlRPCHandler("llRemoteData", XmlRpcRemoteData); |
130 | httpServer.Start(); | 126 | httpServer.Start(); |
@@ -413,4 +409,4 @@ namespace OpenSim.Region.Environment.Modules | |||
413 | return m_localID; | 409 | return m_localID; |
414 | } | 410 | } |
415 | } | 411 | } |
416 | } \ No newline at end of file | 412 | } |
diff --git a/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs b/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs index 18a87cb..daaa319 100644 --- a/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs +++ b/OpenSim/Region/Environment/Scenes/AvatarAnimations.cs | |||
@@ -35,6 +35,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
35 | { | 35 | { |
36 | public class AvatarAnimations | 36 | public class AvatarAnimations |
37 | { | 37 | { |
38 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
39 | |||
38 | public Dictionary<string, LLUUID> AnimsLLUUID = new Dictionary<string, LLUUID>(); | 40 | public Dictionary<string, LLUUID> AnimsLLUUID = new Dictionary<string, LLUUID>(); |
39 | public Dictionary<LLUUID, string> AnimsNames = new Dictionary<LLUUID, string>(); | 41 | public Dictionary<LLUUID, string> AnimsNames = new Dictionary<LLUUID, string>(); |
40 | 42 | ||
@@ -44,7 +46,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
44 | 46 | ||
45 | public void LoadAnims() | 47 | public void LoadAnims() |
46 | { | 48 | { |
47 | //MainLog.Instance.Verbose("CLIENT", "Loading avatar animations"); | 49 | //m_log.Info("[CLIENT]: Loading avatar animations"); |
48 | using (XmlTextReader reader = new XmlTextReader("data/avataranimations.xml")) | 50 | using (XmlTextReader reader = new XmlTextReader("data/avataranimations.xml")) |
49 | { | 51 | { |
50 | XmlDocument doc = new XmlDocument(); | 52 | XmlDocument doc = new XmlDocument(); |
@@ -58,7 +60,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
58 | } | 60 | } |
59 | } | 61 | } |
60 | 62 | ||
61 | // MainLog.Instance.Verbose("CLIENT", "Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)"); | 63 | // m_log.Info("[CLIENT]: Loaded " + AnimsLLUUID.Count.ToString() + " animation(s)"); |
62 | 64 | ||
63 | try | 65 | try |
64 | { | 66 | { |
@@ -70,7 +72,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
70 | } | 72 | } |
71 | catch (InvalidOperationException) | 73 | catch (InvalidOperationException) |
72 | { | 74 | { |
73 | MainLog.Instance.Warn("AVATAR", "Unable to load animation names for an Avatar"); | 75 | m_log.Warn("[AVATAR]: Unable to load animation names for an Avatar"); |
74 | } | 76 | } |
75 | } | 77 | } |
76 | } | 78 | } |
diff --git a/OpenSim/Region/Environment/Scenes/InnerScene.cs b/OpenSim/Region/Environment/Scenes/InnerScene.cs index 6c0ed28..49aeaf9 100644 --- a/OpenSim/Region/Environment/Scenes/InnerScene.cs +++ b/OpenSim/Region/Environment/Scenes/InnerScene.cs | |||
@@ -42,6 +42,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
42 | 42 | ||
43 | public class InnerScene | 43 | public class InnerScene |
44 | { | 44 | { |
45 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | |||
45 | #region Events | 47 | #region Events |
46 | 48 | ||
47 | public event PhysicsCrash UnRecoverableError; | 49 | public event PhysicsCrash UnRecoverableError; |
@@ -227,13 +229,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
227 | if (child) | 229 | if (child) |
228 | { | 230 | { |
229 | m_numChildAgents++; | 231 | m_numChildAgents++; |
230 | MainLog.Instance.Verbose("SCENE", m_regInfo.RegionName + ": Creating new child agent."); | 232 | m_log.Info("[SCENE]: " + m_regInfo.RegionName + ": Creating new child agent."); |
231 | } | 233 | } |
232 | else | 234 | else |
233 | { | 235 | { |
234 | m_numRootAgents++; | 236 | m_numRootAgents++; |
235 | MainLog.Instance.Verbose("SCENE", m_regInfo.RegionName + ": Creating new root agent."); | 237 | m_log.Info("[SCENE]: " + m_regInfo.RegionName + ": Creating new root agent."); |
236 | MainLog.Instance.Verbose("SCENE", m_regInfo.RegionName + ": Adding Physical agent."); | 238 | m_log.Info("[SCENE]: " + m_regInfo.RegionName + ": Adding Physical agent."); |
237 | 239 | ||
238 | newAvatar.AddToPhysicalScene(); | 240 | newAvatar.AddToPhysicalScene(); |
239 | } | 241 | } |
@@ -542,7 +544,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
542 | LLVector3 oLoc = ((SceneObjectGroup)ent).AbsolutePosition; | 544 | LLVector3 oLoc = ((SceneObjectGroup)ent).AbsolutePosition; |
543 | float distResult = (float)Util.GetDistanceTo(presence.AbsolutePosition,oLoc); | 545 | float distResult = (float)Util.GetDistanceTo(presence.AbsolutePosition,oLoc); |
544 | 546 | ||
545 | //MainLog.Instance.Verbose("DISTANCE", distResult.ToString()); | 547 | //m_log.Info("[DISTANCE]: " + distResult.ToString()); |
546 | 548 | ||
547 | if (distResult > 60) | 549 | if (distResult > 60) |
548 | { | 550 | { |
@@ -897,9 +899,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
897 | } | 899 | } |
898 | else | 900 | else |
899 | { | 901 | { |
900 | MainLog.Instance.Verbose("SCENE", | 902 | m_log.Info(String.Format("[SCENE]: " + |
901 | "DelinkObjects(): Could not find a root prim out of {0} as given to a delink request!", | 903 | "DelinkObjects(): Could not find a root prim out of {0} as given to a delink request!", |
902 | primIds); | 904 | primIds)); |
903 | } | 905 | } |
904 | } | 906 | } |
905 | 907 | ||
@@ -947,7 +949,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
947 | } | 949 | } |
948 | else | 950 | else |
949 | { | 951 | { |
950 | MainLog.Instance.Warn("SCENE", "Attempted to duplicate nonexistant prim id {0}", GroupID); | 952 | m_log.Warn(String.Format("[SCENE]: Attempted to duplicate nonexistant prim id {0}", GroupID)); |
951 | } | 953 | } |
952 | } | 954 | } |
953 | 955 | ||
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 81783f8..28760fd 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | using System; | ||
29 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
30 | using libsecondlife; | 31 | using libsecondlife; |
31 | using libsecondlife.Packets; | 32 | using libsecondlife.Packets; |
@@ -37,12 +38,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
37 | { | 38 | { |
38 | public partial class Scene | 39 | public partial class Scene |
39 | { | 40 | { |
41 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
40 | /// <summary> | 43 | /// <summary> |
41 | /// Start all the scripts in the scene which should be started. | 44 | /// Start all the scripts in the scene which should be started. |
42 | /// </summary> | 45 | /// </summary> |
43 | public void StartScripts() | 46 | public void StartScripts() |
44 | { | 47 | { |
45 | MainLog.Instance.Verbose("PRIMINVENTORY", "Starting scripts in scene"); | 48 | m_log.Info("[PRIMINVENTORY]: Starting scripts in scene"); |
46 | 49 | ||
47 | foreach (SceneObjectGroup group in Entities.Values) | 50 | foreach (SceneObjectGroup group in Entities.Values) |
48 | { | 51 | { |
@@ -80,8 +83,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
80 | 83 | ||
81 | if (!TryGetAvatar(avatarId, out avatar)) | 84 | if (!TryGetAvatar(avatarId, out avatar)) |
82 | { | 85 | { |
83 | MainLog.Instance.Error( | 86 | m_log.Error(String.Format( |
84 | "AGENTINVENTORY", "Could not find avatar {0} to add inventory item", avatarId); | 87 | "[AGENTINVENTORY]: Could not find avatar {0} to add inventory item", avatarId)); |
85 | return; | 88 | return; |
86 | } | 89 | } |
87 | 90 | ||
@@ -143,10 +146,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
143 | } | 146 | } |
144 | else | 147 | else |
145 | { | 148 | { |
146 | MainLog.Instance.Error( | 149 | m_log.Error(String.Format( |
147 | "AGENTINVENTORY", | 150 | "[AGENTINVENTORY]: " + |
148 | "Avatar {0} cannot be found to update its inventory item asset", | 151 | "Avatar {0} cannot be found to update its inventory item asset", |
149 | avatarId); | 152 | avatarId)); |
150 | } | 153 | } |
151 | 154 | ||
152 | return LLUUID.Zero; | 155 | return LLUUID.Zero; |
@@ -168,10 +171,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
168 | SceneObjectGroup group = part.ParentGroup; | 171 | SceneObjectGroup group = part.ParentGroup; |
169 | if (null == group) | 172 | if (null == group) |
170 | { | 173 | { |
171 | MainLog.Instance.Error( | 174 | m_log.Error(String.Format( |
172 | "PRIMINVENTORY", | 175 | "[PRIMINVENTORY]: " + |
173 | "Prim inventory update requested for item ID {0} in prim ID {1} but this prim does not exist", | 176 | "Prim inventory update requested for item ID {0} in prim ID {1} but this prim does not exist", |
174 | itemId, primId); | 177 | itemId, primId)); |
175 | 178 | ||
176 | return; | 179 | return; |
177 | } | 180 | } |
@@ -217,10 +220,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
217 | } | 220 | } |
218 | else | 221 | else |
219 | { | 222 | { |
220 | MainLog.Instance.Error( | 223 | m_log.Error(String.Format( |
221 | "PRIMINVENTORY", | 224 | "[PRIMINVENTORY]: " + |
222 | "Avatar {0} cannot be found to update its prim item asset", | 225 | "Avatar {0} cannot be found to update its prim item asset", |
223 | avatarId); | 226 | avatarId)); |
224 | } | 227 | } |
225 | } | 228 | } |
226 | 229 | ||
@@ -289,16 +292,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
289 | } | 292 | } |
290 | else | 293 | else |
291 | { | 294 | { |
292 | MainLog.Instance.Error( | 295 | m_log.Error( |
293 | "AGENTINVENTORY", | 296 | "[AGENTINVENTORY]: Item ID " + itemID + " not found for an inventory item update."); |
294 | "Item ID " + itemID + " not found for an inventory item update."); | ||
295 | } | 297 | } |
296 | } | 298 | } |
297 | else | 299 | else |
298 | { | 300 | { |
299 | MainLog.Instance.Error( | 301 | m_log.Error( |
300 | "AGENTINVENTORY", | 302 | "[AGENTINVENTORY]: Agent ID " + remoteClient.AgentId + " not found for an inventory item update."); |
301 | "Agent ID " + remoteClient.AgentId + " not found for an inventory item update."); | ||
302 | } | 303 | } |
303 | } | 304 | } |
304 | 305 | ||
@@ -311,7 +312,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
311 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(oldAgentID); | 312 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(oldAgentID); |
312 | if (userInfo == null) | 313 | if (userInfo == null) |
313 | { | 314 | { |
314 | MainLog.Instance.Error("AGENTINVENTORY", "Failed to find user " + oldAgentID.ToString()); | 315 | m_log.Error("[AGENTINVENTORY]: Failed to find user " + oldAgentID.ToString()); |
315 | return; | 316 | return; |
316 | } | 317 | } |
317 | 318 | ||
@@ -320,13 +321,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
320 | item = userInfo.RootFolder.HasItem(oldItemID); | 321 | item = userInfo.RootFolder.HasItem(oldItemID); |
321 | if (item == null) | 322 | if (item == null) |
322 | { | 323 | { |
323 | MainLog.Instance.Error("AGENTINVENTORY", "Failed to find item " + oldItemID.ToString()); | 324 | m_log.Error("[AGENTINVENTORY]: Failed to find item " + oldItemID.ToString()); |
324 | return; | 325 | return; |
325 | } | 326 | } |
326 | } | 327 | } |
327 | else | 328 | else |
328 | { | 329 | { |
329 | MainLog.Instance.Error("AGENTINVENTORY", "Failed to find item " + oldItemID.ToString()); | 330 | m_log.Error("[AGENTINVENTORY]: Failed to find item " + oldItemID.ToString()); |
330 | return; | 331 | return; |
331 | } | 332 | } |
332 | } | 333 | } |
@@ -335,7 +336,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
335 | AssetBase asset = AssetCache.CopyAsset(item.assetID); | 336 | AssetBase asset = AssetCache.CopyAsset(item.assetID); |
336 | if (asset == null) | 337 | if (asset == null) |
337 | { | 338 | { |
338 | MainLog.Instance.Warn("AGENTINVENTORY", "Failed to find asset " + item.assetID.ToString()); | 339 | m_log.Warn("[AGENTINVENTORY]: Failed to find asset " + item.assetID.ToString()); |
339 | return; | 340 | return; |
340 | } | 341 | } |
341 | 342 | ||
@@ -360,14 +361,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
360 | public void MoveInventoryItem(IClientAPI remoteClient, LLUUID folderID, LLUUID itemID, int length, | 361 | public void MoveInventoryItem(IClientAPI remoteClient, LLUUID folderID, LLUUID itemID, int length, |
361 | string newName) | 362 | string newName) |
362 | { | 363 | { |
363 | MainLog.Instance.Verbose( | 364 | m_log.Info( |
364 | "AGENTINVENTORY", | 365 | "[AGENTINVENTORY]: " + |
365 | "Moving item for " + remoteClient.AgentId.ToString()); | 366 | "Moving item for " + remoteClient.AgentId.ToString()); |
366 | 367 | ||
367 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); | 368 | CachedUserInfo userInfo = CommsManager.UserProfileCacheService.GetUserDetails(remoteClient.AgentId); |
368 | if (userInfo == null) | 369 | if (userInfo == null) |
369 | { | 370 | { |
370 | MainLog.Instance.Error("AGENTINVENTORY", "Failed to find user " + remoteClient.AgentId.ToString()); | 371 | m_log.Error("[AGENTINVENTORY]: Failed to find user " + remoteClient.AgentId.ToString()); |
371 | return; | 372 | return; |
372 | } | 373 | } |
373 | 374 | ||
@@ -388,13 +389,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
388 | } | 389 | } |
389 | else | 390 | else |
390 | { | 391 | { |
391 | MainLog.Instance.Error("AGENTINVENTORY", "Failed to find item " + itemID.ToString()); | 392 | m_log.Error("[AGENTINVENTORY]: Failed to find item " + itemID.ToString()); |
392 | return; | 393 | return; |
393 | } | 394 | } |
394 | } | 395 | } |
395 | else | 396 | else |
396 | { | 397 | { |
397 | MainLog.Instance.Error("AGENTINVENTORY", "Failed to find item " + itemID.ToString() + ", no root folder"); | 398 | m_log.Error("[AGENTINVENTORY]: Failed to find item " + itemID.ToString() + ", no root folder"); |
398 | return; | 399 | return; |
399 | } | 400 | } |
400 | } | 401 | } |
@@ -497,8 +498,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
497 | } | 498 | } |
498 | else | 499 | else |
499 | { | 500 | { |
500 | MainLog.Instance.Error( | 501 | m_log.Error(String.Format( |
501 | "PRIMINVENTORY", "Inventory requested of prim {0} which doesn't exist", primLocalID); | 502 | "[PRIMINVENTORY]: Inventory requested of prim {0} which doesn't exist", primLocalID)); |
502 | } | 503 | } |
503 | } | 504 | } |
504 | 505 | ||
@@ -523,11 +524,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
523 | } | 524 | } |
524 | else | 525 | else |
525 | { | 526 | { |
526 | MainLog.Instance.Error( | 527 | m_log.Error(String.Format( |
527 | "PRIMINVENTORY", | 528 | "[PRIMINVENTORY]: " + |
528 | "Removal of item {0} requested of prim {1} but this prim does not exist", | 529 | "Removal of item {0} requested of prim {1} but this prim does not exist", |
529 | itemID, | 530 | itemID, |
530 | localID); | 531 | localID)); |
531 | } | 532 | } |
532 | } | 533 | } |
533 | 534 | ||
@@ -547,18 +548,18 @@ namespace OpenSim.Region.Environment.Scenes | |||
547 | { | 548 | { |
548 | // TODO Retrieve itemID from client's inventory to pass on | 549 | // TODO Retrieve itemID from client's inventory to pass on |
549 | //group.AddInventoryItem(remoteClient, primLocalID, null); | 550 | //group.AddInventoryItem(remoteClient, primLocalID, null); |
550 | MainLog.Instance.Verbose( | 551 | m_log.Info(String.Format( |
551 | "PRIMINVENTORY", | 552 | "[PRIMINVENTORY]: " + |
552 | "Non script prim inventory not yet implemented!" | 553 | "Non script prim inventory not yet implemented!" |
553 | + "\nUpdateTaskInventory called with item {0}, folder {1}, primLocalID {2}, user {3}", | 554 | + "\nUpdateTaskInventory called with item {0}, folder {1}, primLocalID {2}, user {3}", |
554 | itemID, folderID, primLocalID, remoteClient.Name); | 555 | itemID, folderID, primLocalID, remoteClient.Name)); |
555 | } | 556 | } |
556 | else | 557 | else |
557 | { | 558 | { |
558 | MainLog.Instance.Warn( | 559 | m_log.Warn(String.Format( |
559 | "PRIMINVENTORY", | 560 | "[PRIMINVENTORY]: " + |
560 | "Update with item {0} requested of prim {1} for {2} but this prim does not exist", | 561 | "Update with item {0} requested of prim {1} for {2} but this prim does not exist", |
561 | itemID, primLocalID, remoteClient.Name); | 562 | itemID, primLocalID, remoteClient.Name)); |
562 | } | 563 | } |
563 | } | 564 | } |
564 | 565 | ||
@@ -596,25 +597,25 @@ namespace OpenSim.Region.Environment.Scenes | |||
596 | group.StartScript(localID, copyID); | 597 | group.StartScript(localID, copyID); |
597 | group.GetProperites(remoteClient); | 598 | group.GetProperites(remoteClient); |
598 | 599 | ||
599 | // MainLog.Instance.Verbose( | 600 | // m_log.Info( |
600 | // "PRIMINVENTORY", | 601 | // String.Format("[PRIMINVENTORY]: " + |
601 | // "Rezzed script {0} into prim local ID {1} for user {2}", | 602 | // "Rezzed script {0} into prim local ID {1} for user {2}", |
602 | // item.inventoryName, localID, remoteClient.Name); | 603 | // item.inventoryName, localID, remoteClient.Name)); |
603 | } | 604 | } |
604 | else | 605 | else |
605 | { | 606 | { |
606 | MainLog.Instance.Error( | 607 | m_log.Error(String.Format( |
607 | "PRIMINVENTORY", | 608 | "[PRIMINVENTORY]: " + |
608 | "Could not rez script {0} into prim local ID {1} for user {2}" | 609 | "Could not rez script {0} into prim local ID {1} for user {2}" |
609 | + " because the prim could not be found in the region!", | 610 | + " because the prim could not be found in the region!", |
610 | item.inventoryName, localID, remoteClient.Name); | 611 | item.inventoryName, localID, remoteClient.Name)); |
611 | } | 612 | } |
612 | } | 613 | } |
613 | else | 614 | else |
614 | { | 615 | { |
615 | MainLog.Instance.Error( | 616 | m_log.Error(String.Format( |
616 | "PRIMINVENTORY", "Could not find script inventory item {0} to rez for {1}!", | 617 | "[PRIMINVENTORY]: Could not find script inventory item {0} to rez for {1}!", |
617 | itemID, remoteClient.Name); | 618 | itemID, remoteClient.Name)); |
618 | } | 619 | } |
619 | } | 620 | } |
620 | } | 621 | } |
@@ -646,7 +647,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
646 | foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData) | 647 | foreach (DeRezObjectPacket.ObjectDataBlock Data in DeRezPacket.ObjectData) |
647 | { | 648 | { |
648 | EntityBase selectedEnt = null; | 649 | EntityBase selectedEnt = null; |
649 | //MainLog.Instance.Verbose("CLIENT", "LocalID:" + Data.ObjectLocalID.ToString()); | 650 | //m_log.Info("[CLIENT]: LocalID:" + Data.ObjectLocalID.ToString()); |
650 | 651 | ||
651 | List<EntityBase> EntitieList = GetEntities(); | 652 | List<EntityBase> EntitieList = GetEntities(); |
652 | 653 | ||
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 1d688e3..a724ac0 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -270,12 +270,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
270 | 270 | ||
271 | RegisterDefaultSceneEvents(); | 271 | RegisterDefaultSceneEvents(); |
272 | 272 | ||
273 | MainLog.Instance.Verbose("SCENE", "Creating new entitities instance"); | 273 | m_log.Info("[SCENE]: Creating new entitities instance"); |
274 | Entities = new Dictionary<LLUUID, EntityBase>(); | 274 | Entities = new Dictionary<LLUUID, EntityBase>(); |
275 | m_scenePresences = new Dictionary<LLUUID, ScenePresence>(); | 275 | m_scenePresences = new Dictionary<LLUUID, ScenePresence>(); |
276 | //m_sceneObjects = new Dictionary<LLUUID, SceneObjectGroup>(); | 276 | //m_sceneObjects = new Dictionary<LLUUID, SceneObjectGroup>(); |
277 | 277 | ||
278 | MainLog.Instance.Verbose("SCENE", "Creating LandMap"); | 278 | m_log.Info("[SCENE]: Creating LandMap"); |
279 | Terrain = new TerrainEngine((int) RegionInfo.RegionLocX, (int) RegionInfo.RegionLocY); | 279 | Terrain = new TerrainEngine((int) RegionInfo.RegionLocX, (int) RegionInfo.RegionLocY); |
280 | 280 | ||
281 | ScenePresence.LoadAnims(); | 281 | ScenePresence.LoadAnims(); |
@@ -365,16 +365,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
365 | { | 365 | { |
366 | // This means that we're not booted up completely yet. | 366 | // This means that we're not booted up completely yet. |
367 | // This shouldn't happen too often anymore. | 367 | // This shouldn't happen too often anymore. |
368 | MainLog.Instance.Error("SCENE", | 368 | m_log.Error("[SCENE]: Couldn't inform client of regionup because we got a null reference exception"); |
369 | "Couldn't inform client of regionup because we got a null reference exception"); | ||
370 | } | 369 | } |
371 | } | 370 | } |
372 | else | 371 | else |
373 | { | 372 | { |
374 | MainLog.Instance.Verbose("INTERGRID", | 373 | m_log.Info("[INTERGRID]: Got notice about far away Region: " + otherRegion.RegionName.ToString() + |
375 | "Got notice about far away Region: " + otherRegion.RegionName.ToString() + | 374 | " at (" + otherRegion.RegionLocX.ToString() + ", " + |
376 | " at (" + otherRegion.RegionLocX.ToString() + ", " + | 375 | otherRegion.RegionLocY.ToString() + ")"); |
377 | otherRegion.RegionLocY.ToString() + ")"); | ||
378 | } | 376 | } |
379 | } | 377 | } |
380 | return true; | 378 | return true; |
@@ -402,7 +400,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
402 | m_RestartTimerCounter = 0; | 400 | m_RestartTimerCounter = 0; |
403 | m_restartTimer.AutoReset = true; | 401 | m_restartTimer.AutoReset = true; |
404 | m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); | 402 | m_restartTimer.Elapsed += new ElapsedEventHandler(RestartTimer_Elapsed); |
405 | MainLog.Instance.Error("REGION", "Restarting Region in " + (seconds/60) + " minutes"); | 403 | m_log.Error("[REGION]: Restarting Region in " + (seconds/60) + " minutes"); |
406 | m_restartTimer.Start(); | 404 | m_restartTimer.Start(); |
407 | SendRegionMessageFromEstateTools(LLUUID.Random(), LLUUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in 2 Minutes"); | 405 | SendRegionMessageFromEstateTools(LLUUID.Random(), LLUUID.Random(), String.Empty, RegionInfo.RegionName + ": Restarting in 2 Minutes"); |
408 | //SendGeneralAlert(RegionInfo.RegionName + ": Restarting in 2 Minutes"); | 406 | //SendGeneralAlert(RegionInfo.RegionName + ": Restarting in 2 Minutes"); |
@@ -436,9 +434,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
436 | // This causes the region to restart immediatley. | 434 | // This causes the region to restart immediatley. |
437 | public void RestartNow() | 435 | public void RestartNow() |
438 | { | 436 | { |
439 | MainLog.Instance.Error("REGION", "Closing"); | 437 | m_log.Error("[REGION]: Closing"); |
440 | Close(); | 438 | Close(); |
441 | MainLog.Instance.Error("REGION", "Firing Region Restart Message"); | 439 | m_log.Error("[REGION]: Firing Region Restart Message"); |
442 | base.Restart(0); | 440 | base.Restart(0); |
443 | } | 441 | } |
444 | 442 | ||
@@ -485,7 +483,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
485 | if (m_scripts_enabled != !ScriptEngine) | 483 | if (m_scripts_enabled != !ScriptEngine) |
486 | { | 484 | { |
487 | // Tedd! Here's the method to disable the scripting engine! | 485 | // Tedd! Here's the method to disable the scripting engine! |
488 | MainLog.Instance.Verbose("TOTEDD", "Here is the method to trigger disabling of the scripting engine"); | 486 | m_log.Info("[TOTEDD]: Here is the method to trigger disabling of the scripting engine"); |
489 | } | 487 | } |
490 | if (m_physics_enabled != !PhysicsEngine) | 488 | if (m_physics_enabled != !PhysicsEngine) |
491 | { | 489 | { |
@@ -498,7 +496,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
498 | // This is the method that shuts down the scene. | 496 | // This is the method that shuts down the scene. |
499 | public override void Close() | 497 | public override void Close() |
500 | { | 498 | { |
501 | MainLog.Instance.Warn("SCENE", "Closing down the single simulator: " + RegionInfo.RegionName); | 499 | m_log.Warn("[SCENE]: Closing down the single simulator: " + RegionInfo.RegionName); |
502 | // Kick all ROOT agents with the message, 'The simulator is going down' | 500 | // Kick all ROOT agents with the message, 'The simulator is going down' |
503 | ForEachScenePresence(delegate(ScenePresence avatar) | 501 | ForEachScenePresence(delegate(ScenePresence avatar) |
504 | { | 502 | { |
@@ -543,7 +541,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
543 | /// </summary> | 541 | /// </summary> |
544 | public void StartTimer() | 542 | public void StartTimer() |
545 | { | 543 | { |
546 | MainLog.Instance.Debug("SCENE", "Starting timer"); | 544 | m_log.Debug("[SCENE]: Starting timer"); |
547 | m_heartbeatTimer.Enabled = true; | 545 | m_heartbeatTimer.Enabled = true; |
548 | m_heartbeatTimer.Interval = (int) (m_timespan*1000); | 546 | m_heartbeatTimer.Interval = (int) (m_timespan*1000); |
549 | m_heartbeatTimer.Elapsed += new ElapsedEventHandler(Heartbeat); | 547 | m_heartbeatTimer.Elapsed += new ElapsedEventHandler(Heartbeat); |
@@ -649,7 +647,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
649 | } | 647 | } |
650 | catch (Exception e) | 648 | catch (Exception e) |
651 | { | 649 | { |
652 | MainLog.Instance.Error("Scene", "Failed with exception " + e.ToString()); | 650 | m_log.Error("[Scene]: Failed with exception " + e.ToString()); |
653 | } | 651 | } |
654 | finally | 652 | finally |
655 | { | 653 | { |
@@ -848,7 +846,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
848 | { | 846 | { |
849 | if (string.IsNullOrEmpty(m_regInfo.EstateSettings.terrainFile)) | 847 | if (string.IsNullOrEmpty(m_regInfo.EstateSettings.terrainFile)) |
850 | { | 848 | { |
851 | MainLog.Instance.Verbose("TERRAIN", "No default terrain. Generating a new terrain."); | 849 | m_log.Info("[TERRAIN]: No default terrain. Generating a new terrain."); |
852 | Terrain.SetDefaultTerrain(); | 850 | Terrain.SetDefaultTerrain(); |
853 | 851 | ||
854 | m_storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID); | 852 | m_storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID); |
@@ -862,8 +860,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
862 | } | 860 | } |
863 | catch | 861 | catch |
864 | { | 862 | { |
865 | MainLog.Instance.Verbose("TERRAIN", | 863 | m_log.Info("[TERRAIN]: No terrain found in database or default. Generating a new terrain."); |
866 | "No terrain found in database or default. Generating a new terrain."); | ||
867 | Terrain.SetDefaultTerrain(); | 864 | Terrain.SetDefaultTerrain(); |
868 | } | 865 | } |
869 | m_storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID); | 866 | m_storageManager.DataStore.StoreTerrain(Terrain.GetHeights2DD(), RegionInfo.RegionID); |
@@ -879,7 +876,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
879 | } | 876 | } |
880 | catch (Exception e) | 877 | catch (Exception e) |
881 | { | 878 | { |
882 | MainLog.Instance.Warn("terrain", "Scene.cs: LoadWorldMap() - Failed with exception " + e.ToString()); | 879 | m_log.Warn("[terrain]: Scene.cs: LoadWorldMap() - Failed with exception " + e.ToString()); |
883 | } | 880 | } |
884 | } | 881 | } |
885 | 882 | ||
@@ -894,12 +891,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
894 | { | 891 | { |
895 | if (dGridSettings["allow_forceful_banlines"] != "TRUE") | 892 | if (dGridSettings["allow_forceful_banlines"] != "TRUE") |
896 | { | 893 | { |
897 | MainLog.Instance.Verbose("GRID", "Grid is disabling forceful parcel banlists"); | 894 | m_log.Info("[GRID]: Grid is disabling forceful parcel banlists"); |
898 | m_LandManager.allowedForcefulBans = false; | 895 | m_LandManager.allowedForcefulBans = false; |
899 | } | 896 | } |
900 | else | 897 | else |
901 | { | 898 | { |
902 | MainLog.Instance.Verbose("GRID", "Grid is allowing forceful parcel banlists"); | 899 | m_log.Info("[GRID]: Grid is allowing forceful parcel banlists"); |
903 | m_LandManager.allowedForcefulBans = true; | 900 | m_LandManager.allowedForcefulBans = true; |
904 | } | 901 | } |
905 | } | 902 | } |
@@ -929,7 +926,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
929 | 926 | ||
930 | public void loadAllLandObjectsFromStorage() | 927 | public void loadAllLandObjectsFromStorage() |
931 | { | 928 | { |
932 | MainLog.Instance.Verbose("SCENE", "Loading land objects from storage"); | 929 | m_log.Info("[SCENE]: Loading land objects from storage"); |
933 | List<LandData> landData = m_storageManager.DataStore.LoadLandObjects(RegionInfo.RegionID); | 930 | List<LandData> landData = m_storageManager.DataStore.LoadLandObjects(RegionInfo.RegionID); |
934 | 931 | ||
935 | if (landData.Count == 0) | 932 | if (landData.Count == 0) |
@@ -951,7 +948,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
951 | /// </summary> | 948 | /// </summary> |
952 | public virtual void LoadPrimsFromStorage(bool m_permissions) | 949 | public virtual void LoadPrimsFromStorage(bool m_permissions) |
953 | { | 950 | { |
954 | MainLog.Instance.Verbose("SCENE", "Loading objects from datastore"); | 951 | m_log.Info("[SCENE]: Loading objects from datastore"); |
955 | 952 | ||
956 | List<SceneObjectGroup> PrimsFromDB = m_storageManager.DataStore.LoadObjects(m_regInfo.RegionID); | 953 | List<SceneObjectGroup> PrimsFromDB = m_storageManager.DataStore.LoadObjects(m_regInfo.RegionID); |
957 | foreach (SceneObjectGroup group in PrimsFromDB) | 954 | foreach (SceneObjectGroup group in PrimsFromDB) |
@@ -964,7 +961,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
964 | //rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); | 961 | //rootPart.DoPhysicsPropertyUpdate(UsePhysics, true); |
965 | } | 962 | } |
966 | 963 | ||
967 | MainLog.Instance.Verbose("SCENE", "Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)"); | 964 | m_log.Info("[SCENE]: Loaded " + PrimsFromDB.Count.ToString() + " SceneObject(s)"); |
968 | } | 965 | } |
969 | 966 | ||
970 | 967 | ||
@@ -999,7 +996,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
999 | { | 996 | { |
1000 | pos = target.AbsolutePosition; | 997 | pos = target.AbsolutePosition; |
1001 | 998 | ||
1002 | //MainLog.Instance.Verbose("RAYTRACE", pos.ToString()); | 999 | //m_log.Info("[RAYTRACE]: " + pos.ToString()); |
1003 | //EntityIntersection rayTracing = null; | 1000 | //EntityIntersection rayTracing = null; |
1004 | //ScenePresence presence = ((ScenePresence)GetScenePresence(ownerID)); | 1001 | //ScenePresence presence = ((ScenePresence)GetScenePresence(ownerID)); |
1005 | //if (presence != null) | 1002 | //if (presence != null) |
@@ -1038,14 +1035,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
1038 | 1035 | ||
1039 | //Vector3 RezPoint = Newpos; | 1036 | //Vector3 RezPoint = Newpos; |
1040 | 1037 | ||
1041 | //MainLog.Instance.Verbose("REZINFO", "Possible Rez Point:" + RezPoint.ToString()); | 1038 | //m_log.Info("[REZINFO]: Possible Rez Point:" + RezPoint.ToString()); |
1042 | //pos = new LLVector3(RezPoint.x, RezPoint.y, RezPoint.z); | 1039 | //pos = new LLVector3(RezPoint.x, RezPoint.y, RezPoint.z); |
1043 | //} | 1040 | //} |
1044 | 1041 | ||
1045 | |||
1046 | |||
1047 | |||
1048 | |||
1049 | return pos; | 1042 | return pos; |
1050 | } | 1043 | } |
1051 | else | 1044 | else |
@@ -1061,18 +1054,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
1061 | pos = RayEnd; | 1054 | pos = RayEnd; |
1062 | return pos; | 1055 | return pos; |
1063 | } | 1056 | } |
1064 | |||
1065 | } | 1057 | } |
1066 | 1058 | ||
1067 | public virtual void AddNewPrim(LLUUID ownerID, LLVector3 RayEnd, LLQuaternion rot, PrimitiveBaseShape shape, | 1059 | public virtual void AddNewPrim(LLUUID ownerID, LLVector3 RayEnd, LLQuaternion rot, PrimitiveBaseShape shape, |
1068 | byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, | 1060 | byte bypassRaycast, LLVector3 RayStart, LLUUID RayTargetID, |
1069 | byte RayEndIsIntersection) | 1061 | byte RayEndIsIntersection) |
1070 | { | 1062 | { |
1071 | LLVector3 pos = GetNewRezLocation(RayStart, RayEnd, RayTargetID, rot, bypassRaycast, RayEndIsIntersection); | 1063 | LLVector3 pos = GetNewRezLocation(RayStart, RayEnd, RayTargetID, rot, bypassRaycast, RayEndIsIntersection); |
1072 | 1064 | ||
1073 | |||
1074 | |||
1075 | |||
1076 | if (PermissionsMngr.CanRezObject(ownerID, pos)) | 1065 | if (PermissionsMngr.CanRezObject(ownerID, pos)) |
1077 | { | 1066 | { |
1078 | // rez ON the ground, not IN the ground | 1067 | // rez ON the ground, not IN the ground |
@@ -1364,7 +1353,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1364 | } | 1353 | } |
1365 | catch (Exception e) | 1354 | catch (Exception e) |
1366 | { | 1355 | { |
1367 | MainLog.Instance.Error("Scene.cs:RemoveClient exception: " + e.ToString()); | 1356 | m_log.Error("Scene.cs:RemoveClient exception: " + e.ToString()); |
1368 | } | 1357 | } |
1369 | 1358 | ||
1370 | // Remove client agent from profile, so new logins will work | 1359 | // Remove client agent from profile, so new logins will work |
@@ -1474,7 +1463,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1474 | 1463 | ||
1475 | if (m_capsHandlers.ContainsKey(agent.AgentID)) | 1464 | if (m_capsHandlers.ContainsKey(agent.AgentID)) |
1476 | { | 1465 | { |
1477 | //MainLog.Instance.Warn("client", "Adding duplicate CAPS entry for user " + | 1466 | //m_log.Warn("[client]: Adding duplicate CAPS entry for user " + |
1478 | // agent.AgentID.ToString()); | 1467 | // agent.AgentID.ToString()); |
1479 | try | 1468 | try |
1480 | { | 1469 | { |
@@ -1514,8 +1503,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
1514 | } | 1503 | } |
1515 | catch (Exception e) | 1504 | catch (Exception e) |
1516 | { | 1505 | { |
1517 | MainLog.Instance.Verbose("SCENE", "Unable to do Agent Crossing."); | 1506 | m_log.Info("[SCENE]: Unable to do Agent Crossing."); |
1518 | MainLog.Instance.Debug("SCENE", e.ToString()); | 1507 | m_log.Debug("[SCENE]: " + e.ToString()); |
1519 | } | 1508 | } |
1520 | //m_innerScene.SwapRootChildAgent(false); | 1509 | //m_innerScene.SwapRootChildAgent(false); |
1521 | } | 1510 | } |
@@ -2158,14 +2147,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
2158 | switch (showWhat) | 2147 | switch (showWhat) |
2159 | { | 2148 | { |
2160 | case "users": | 2149 | case "users": |
2161 | MainLog.Instance.Error("Current Region: " + RegionInfo.RegionName); | 2150 | m_log.Error("Current Region: " + RegionInfo.RegionName); |
2162 | MainLog.Instance.Error( | 2151 | m_log.Error( |
2163 | String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}{6,-16}", "Firstname", "Lastname", | 2152 | String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16}{5,-16}{6,-16}", "Firstname", "Lastname", |
2164 | "Agent ID", "Session ID", "Circuit", "IP", "World")); | 2153 | "Agent ID", "Session ID", "Circuit", "IP", "World")); |
2165 | 2154 | ||
2166 | foreach (ScenePresence scenePrescence in GetAvatars()) | 2155 | foreach (ScenePresence scenePrescence in GetAvatars()) |
2167 | { | 2156 | { |
2168 | MainLog.Instance.Error( | 2157 | m_log.Error( |
2169 | String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}{6,-16}", | 2158 | String.Format("{0,-16}{1,-16}{2,-25}{3,-25}{4,-16},{5,-16}{6,-16}", |
2170 | scenePrescence.Firstname, | 2159 | scenePrescence.Firstname, |
2171 | scenePrescence.Lastname, | 2160 | scenePrescence.Lastname, |
@@ -2177,12 +2166,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
2177 | } | 2166 | } |
2178 | break; | 2167 | break; |
2179 | case "modules": | 2168 | case "modules": |
2180 | MainLog.Instance.Error("The currently loaded modules in " + RegionInfo.RegionName + " are:"); | 2169 | m_log.Error("The currently loaded modules in " + RegionInfo.RegionName + " are:"); |
2181 | foreach (IRegionModule module in Modules.Values) | 2170 | foreach (IRegionModule module in Modules.Values) |
2182 | { | 2171 | { |
2183 | if (!module.IsSharedModule) | 2172 | if (!module.IsSharedModule) |
2184 | { | 2173 | { |
2185 | MainLog.Instance.Error("Region Module: " + module.Name); | 2174 | m_log.Error("Region Module: " + module.Name); |
2186 | } | 2175 | } |
2187 | } | 2176 | } |
2188 | break; | 2177 | break; |
@@ -2250,11 +2239,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
2250 | /// | 2239 | /// |
2251 | /// </summary> | 2240 | /// </summary> |
2252 | /// <param name="scriptEngine"></param> | 2241 | /// <param name="scriptEngine"></param> |
2253 | /// <param name="logger"></param> | 2242 | public void AddScriptEngine(ScriptEngineInterface scriptEngine) |
2254 | public void AddScriptEngine(ScriptEngineInterface scriptEngine, LogBase logger) | ||
2255 | { | 2243 | { |
2256 | ScriptEngines.Add(scriptEngine); | 2244 | ScriptEngines.Add(scriptEngine); |
2257 | scriptEngine.InitializeEngine(this, logger); | 2245 | scriptEngine.InitializeEngine(this); |
2258 | } | 2246 | } |
2259 | 2247 | ||
2260 | public void TriggerObjectChanged(uint localID, uint change) | 2248 | public void TriggerObjectChanged(uint localID, uint change) |
@@ -2372,7 +2360,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
2372 | } | 2360 | } |
2373 | catch (Exception e) | 2361 | catch (Exception e) |
2374 | { | 2362 | { |
2375 | MainLog.Instance.Verbose("BUG", e.ToString()); | 2363 | m_log.Info("[BUG]: " + e.ToString()); |
2376 | } | 2364 | } |
2377 | } | 2365 | } |
2378 | } | 2366 | } |
diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs index d4a4bb0..2e95322 100644 --- a/OpenSim/Region/Environment/Scenes/SceneBase.cs +++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs | |||
@@ -36,6 +36,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
36 | { | 36 | { |
37 | public abstract class SceneBase : IScene | 37 | public abstract class SceneBase : IScene |
38 | { | 38 | { |
39 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
40 | |||
39 | #region Events | 41 | #region Events |
40 | 42 | ||
41 | public event restart OnRestart; | 43 | public event restart OnRestart; |
@@ -155,7 +157,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
155 | /// <param name="seconds"></param> | 157 | /// <param name="seconds"></param> |
156 | public virtual void Restart(int seconds) | 158 | public virtual void Restart(int seconds) |
157 | { | 159 | { |
158 | MainLog.Instance.Error("REGION", "passing Restart Message up the namespace"); | 160 | m_log.Error("[REGION]: passing Restart Message up the namespace"); |
159 | OnRestart(RegionInfo); | 161 | OnRestart(RegionInfo); |
160 | } | 162 | } |
161 | 163 | ||
@@ -180,7 +182,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
180 | } | 182 | } |
181 | catch (Exception e) | 183 | catch (Exception e) |
182 | { | 184 | { |
183 | MainLog.Instance.Error("SCENE", "SceneBase.cs: Close() - Failed with exception " + e.ToString()); | 185 | m_log.Error("[SCENE]: SceneBase.cs: Close() - Failed with exception " + e.ToString()); |
184 | } | 186 | } |
185 | } | 187 | } |
186 | 188 | ||
diff --git a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs index 2bb36a3..a89b52c 100644 --- a/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs +++ b/OpenSim/Region/Environment/Scenes/SceneCommunicationService.cs | |||
@@ -40,6 +40,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
40 | 40 | ||
41 | public class SceneCommunicationService //one instance per region | 41 | public class SceneCommunicationService //one instance per region |
42 | { | 42 | { |
43 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
44 | |||
43 | protected CommunicationsManager m_commsProvider; | 45 | protected CommunicationsManager m_commsProvider; |
44 | protected RegionInfo m_regionInfo; | 46 | protected RegionInfo m_regionInfo; |
45 | 47 | ||
@@ -77,7 +79,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
77 | 79 | ||
78 | if (regionCommsHost != null) | 80 | if (regionCommsHost != null) |
79 | { | 81 | { |
80 | //MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: registered with gridservice and got" + regionCommsHost.ToString()); | 82 | //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: registered with gridservice and got" + regionCommsHost.ToString()); |
81 | 83 | ||
82 | regionCommsHost.debugRegionName = _debugRegionName; | 84 | regionCommsHost.debugRegionName = _debugRegionName; |
83 | 85 | ||
@@ -91,7 +93,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
91 | } | 93 | } |
92 | else | 94 | else |
93 | { | 95 | { |
94 | //MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: registered with gridservice and got null"); | 96 | //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: registered with gridservice and got null"); |
95 | } | 97 | } |
96 | } | 98 | } |
97 | 99 | ||
@@ -122,7 +124,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
122 | { | 124 | { |
123 | if (OnExpectUser != null) | 125 | if (OnExpectUser != null) |
124 | { | 126 | { |
125 | //MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: OnExpectUser Fired for User:" + agent.firstname + " " + agent.lastname); | 127 | //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: OnExpectUser Fired for User:" + agent.firstname + " " + agent.lastname); |
126 | OnExpectUser(regionHandle, agent); | 128 | OnExpectUser(regionHandle, agent); |
127 | } | 129 | } |
128 | } | 130 | } |
@@ -131,7 +133,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
131 | { | 133 | { |
132 | if (OnRegionUp != null) | 134 | if (OnRegionUp != null) |
133 | { | 135 | { |
134 | //MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: newRegionUp Fired for User:" + region.RegionName); | 136 | //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: newRegionUp Fired for User:" + region.RegionName); |
135 | OnRegionUp(region); | 137 | OnRegionUp(region); |
136 | } | 138 | } |
137 | return true; | 139 | return true; |
@@ -164,7 +166,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
164 | 166 | ||
165 | protected bool CloseConnection(ulong regionHandle, LLUUID agentID) | 167 | protected bool CloseConnection(ulong regionHandle, LLUUID agentID) |
166 | { | 168 | { |
167 | MainLog.Instance.Verbose("INTERREGION", "Incoming Agent Close Request for agent: " + agentID.ToString()); | 169 | m_log.Info("[INTERREGION]: Incoming Agent Close Request for agent: " + agentID.ToString()); |
168 | 170 | ||
169 | if (OnCloseAgentConnection != null) | 171 | if (OnCloseAgentConnection != null) |
170 | { | 172 | { |
@@ -199,14 +201,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
199 | private void InformClientOfNeighbourAsync(ScenePresence avatar, AgentCircuitData a, ulong regionHandle, | 201 | private void InformClientOfNeighbourAsync(ScenePresence avatar, AgentCircuitData a, ulong regionHandle, |
200 | IPEndPoint endPoint) | 202 | IPEndPoint endPoint) |
201 | { | 203 | { |
202 | MainLog.Instance.Notice("INTERGRID", "Starting to inform client about neighbours"); | 204 | m_log.Info("[INTERGRID]: Starting to inform client about neighbours"); |
203 | bool regionAccepted = m_commsProvider.InterRegion.InformRegionOfChildAgent(regionHandle, a); | 205 | bool regionAccepted = m_commsProvider.InterRegion.InformRegionOfChildAgent(regionHandle, a); |
204 | 206 | ||
205 | if (regionAccepted) | 207 | if (regionAccepted) |
206 | { | 208 | { |
207 | avatar.ControllingClient.InformClientOfNeighbour(regionHandle, endPoint); | 209 | avatar.ControllingClient.InformClientOfNeighbour(regionHandle, endPoint); |
208 | avatar.AddNeighbourRegion(regionHandle); | 210 | avatar.AddNeighbourRegion(regionHandle); |
209 | MainLog.Instance.Notice("INTERGRID", "Completed inform client about neighbours"); | 211 | m_log.Info("[INTERGRID]: Completed inform client about neighbours"); |
210 | } | 212 | } |
211 | } | 213 | } |
212 | 214 | ||
@@ -291,17 +293,17 @@ namespace OpenSim.Region.Environment.Scenes | |||
291 | 293 | ||
292 | private void InformNeighboursThatRegionIsUpAsync(RegionInfo region, ulong regionhandle) | 294 | private void InformNeighboursThatRegionIsUpAsync(RegionInfo region, ulong regionhandle) |
293 | { | 295 | { |
294 | MainLog.Instance.Notice("INTERGRID", "Starting to inform neighbors that I'm here"); | 296 | m_log.Info("[INTERGRID]: Starting to inform neighbors that I'm here"); |
295 | bool regionAccepted = | 297 | bool regionAccepted = |
296 | m_commsProvider.InterRegion.RegionUp((new SearializableRegionInfo(region)), regionhandle); | 298 | m_commsProvider.InterRegion.RegionUp((new SearializableRegionInfo(region)), regionhandle); |
297 | 299 | ||
298 | if (regionAccepted) | 300 | if (regionAccepted) |
299 | { | 301 | { |
300 | MainLog.Instance.Notice("INTERGRID", "Completed informing neighbors that I'm here"); | 302 | m_log.Info("[INTERGRID]: Completed informing neighbors that I'm here"); |
301 | } | 303 | } |
302 | else | 304 | else |
303 | { | 305 | { |
304 | MainLog.Instance.Notice("INTERGRID", "Failed to inform neighbors that I'm here"); | 306 | m_log.Info("[INTERGRID]: Failed to inform neighbors that I'm here"); |
305 | } | 307 | } |
306 | } | 308 | } |
307 | 309 | ||
@@ -311,7 +313,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
311 | /// </summary> | 313 | /// </summary> |
312 | public void InformNeighborsThatRegionisUp(RegionInfo region) | 314 | public void InformNeighborsThatRegionisUp(RegionInfo region) |
313 | { | 315 | { |
314 | //MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: Sending InterRegion Notification that region is up " + region.RegionName); | 316 | //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending InterRegion Notification that region is up " + region.RegionName); |
315 | 317 | ||
316 | 318 | ||
317 | List<SimpleRegionInfo> neighbours = new List<SimpleRegionInfo>(); | 319 | List<SimpleRegionInfo> neighbours = new List<SimpleRegionInfo>(); |
@@ -343,7 +345,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
343 | /// </summary> | 345 | /// </summary> |
344 | private void SendChildAgentDataUpdateAsync(ChildAgentDataUpdate cAgentData, ScenePresence presence) | 346 | private void SendChildAgentDataUpdateAsync(ChildAgentDataUpdate cAgentData, ScenePresence presence) |
345 | { | 347 | { |
346 | //MainLog.Instance.Notice("INTERGRID", "Informing neighbors about my agent."); | 348 | //m_log.Info("[INTERGRID]: Informing neighbors about my agent."); |
347 | try | 349 | try |
348 | { | 350 | { |
349 | foreach (ulong regionHandle in presence.KnownChildRegions) | 351 | foreach (ulong regionHandle in presence.KnownChildRegions) |
@@ -352,11 +354,11 @@ namespace OpenSim.Region.Environment.Scenes | |||
352 | 354 | ||
353 | if (regionAccepted) | 355 | if (regionAccepted) |
354 | { | 356 | { |
355 | //MainLog.Instance.Notice("INTERGRID", "Completed sending a neighbor an update about my agent"); | 357 | //m_log.Info("[INTERGRID]: Completed sending a neighbor an update about my agent"); |
356 | } | 358 | } |
357 | else | 359 | else |
358 | { | 360 | { |
359 | //MainLog.Instance.Notice("INTERGRID", "Failed sending a neighbor an update about my agent"); | 361 | //m_log.Info("[INTERGRID]: Failed sending a neighbor an update about my agent"); |
360 | } | 362 | } |
361 | } | 363 | } |
362 | } | 364 | } |
@@ -397,12 +399,12 @@ namespace OpenSim.Region.Environment.Scenes | |||
397 | 399 | ||
398 | if (regionAccepted) | 400 | if (regionAccepted) |
399 | { | 401 | { |
400 | MainLog.Instance.Notice("INTERGRID", "Completed sending agent Close agent Request to neighbor"); | 402 | m_log.Info("[INTERGRID]: Completed sending agent Close agent Request to neighbor"); |
401 | presence.RemoveNeighbourRegion(regionHandle); | 403 | presence.RemoveNeighbourRegion(regionHandle); |
402 | } | 404 | } |
403 | else | 405 | else |
404 | { | 406 | { |
405 | MainLog.Instance.Notice("INTERGRID", "Failed sending agent Close agent Request to neighbor"); | 407 | m_log.Info("[INTERGRID]: Failed sending agent Close agent Request to neighbor"); |
406 | 408 | ||
407 | } | 409 | } |
408 | 410 | ||
@@ -431,7 +433,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
431 | /// <returns></returns> | 433 | /// <returns></returns> |
432 | public virtual RegionInfo RequestNeighbouringRegionInfo(ulong regionHandle) | 434 | public virtual RegionInfo RequestNeighbouringRegionInfo(ulong regionHandle) |
433 | { | 435 | { |
434 | //MainLog.Instance.Verbose("INTER", debugRegionName + ": SceneCommunicationService: Sending Grid Services Request about neighbor " + regionHandle.ToString()); | 436 | //m_log.Info("[INTER]: " + debugRegionName + ": SceneCommunicationService: Sending Grid Services Request about neighbor " + regionHandle.ToString()); |
435 | return m_commsProvider.GridService.RequestNeighbourInfo(regionHandle); | 437 | return m_commsProvider.GridService.RequestNeighbourInfo(regionHandle); |
436 | } | 438 | } |
437 | 439 | ||
diff --git a/OpenSim/Region/Environment/Scenes/SceneManager.cs b/OpenSim/Region/Environment/Scenes/SceneManager.cs index 1eac61b..7156428 100644 --- a/OpenSim/Region/Environment/Scenes/SceneManager.cs +++ b/OpenSim/Region/Environment/Scenes/SceneManager.cs | |||
@@ -38,6 +38,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
38 | 38 | ||
39 | public class SceneManager | 39 | public class SceneManager |
40 | { | 40 | { |
41 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
41 | public event RestartSim OnRestartSim; | 43 | public event RestartSim OnRestartSim; |
42 | 44 | ||
43 | private readonly List<Scene> m_localScenes; | 45 | private readonly List<Scene> m_localScenes; |
@@ -98,8 +100,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
98 | 100 | ||
99 | public void HandleRestart(RegionInfo rdata) | 101 | public void HandleRestart(RegionInfo rdata) |
100 | { | 102 | { |
101 | MainLog.Instance.Error("SCENEMANAGER", | 103 | m_log.Error("[SCENEMANAGER]: Got Restart message for region:" + rdata.RegionName + " Sending up to main"); |
102 | "Got Restart message for region:" + rdata.RegionName + " Sending up to main"); | ||
103 | int RegionSceneElement = -1; | 104 | int RegionSceneElement = -1; |
104 | for (int i = 0; i < m_localScenes.Count; i++) | 105 | for (int i = 0; i < m_localScenes.Count; i++) |
105 | { | 106 | { |
@@ -146,7 +147,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
146 | } | 147 | } |
147 | else | 148 | else |
148 | { | 149 | { |
149 | MainLog.Instance.Error("REGION", "Unable to notify Other regions of this Region coming up"); | 150 | m_log.Error("[REGION]: Unable to notify Other regions of this Region coming up"); |
150 | } | 151 | } |
151 | } | 152 | } |
152 | 153 | ||
@@ -285,29 +286,29 @@ namespace OpenSim.Region.Environment.Scenes | |||
285 | return false; | 286 | return false; |
286 | } | 287 | } |
287 | 288 | ||
288 | public void SetDebugPacketOnCurrentScene(LogBase log, int newDebug) | 289 | public void SetDebugPacketOnCurrentScene(int newDebug) |
289 | { | 290 | { |
290 | ForEachCurrentScene(delegate(Scene scene) | 291 | ForEachCurrentScene(delegate(Scene scene) |
291 | { | 292 | { |
292 | List<EntityBase> EntitieList = scene.GetEntities(); | 293 | List<EntityBase> EntitieList = scene.GetEntities(); |
293 | 294 | ||
294 | foreach (EntityBase entity in EntitieList) | 295 | foreach (EntityBase entity in EntitieList) |
296 | { | ||
297 | if (entity is ScenePresence) | ||
295 | { | 298 | { |
296 | if (entity is ScenePresence) | 299 | ScenePresence scenePrescence = entity as ScenePresence; |
300 | if (!scenePrescence.IsChildAgent) | ||
297 | { | 301 | { |
298 | ScenePresence scenePrescence = entity as ScenePresence; | 302 | m_log.Error(String.Format("Packet debug for {0} {1} set to {2}", |
299 | if (!scenePrescence.IsChildAgent) | 303 | scenePrescence.Firstname, |
300 | { | 304 | scenePrescence.Lastname, |
301 | log.Error(String.Format("Packet debug for {0} {1} set to {2}", | 305 | newDebug)); |
302 | scenePrescence.Firstname, | ||
303 | scenePrescence.Lastname, | ||
304 | newDebug)); | ||
305 | 306 | ||
306 | scenePrescence.ControllingClient.SetDebug(newDebug); | 307 | scenePrescence.ControllingClient.SetDebug(newDebug); |
307 | } | ||
308 | } | 308 | } |
309 | } | 309 | } |
310 | }); | 310 | } |
311 | }); | ||
311 | } | 312 | } |
312 | 313 | ||
313 | public List<ScenePresence> GetCurrentSceneAvatars() | 314 | public List<ScenePresence> GetCurrentSceneAvatars() |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs index 1bddf25..0956f74 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.Inventory.cs | |||
@@ -38,6 +38,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
38 | { | 38 | { |
39 | public partial class SceneObjectGroup : EntityBase | 39 | public partial class SceneObjectGroup : EntityBase |
40 | { | 40 | { |
41 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
41 | /// <summary> | 43 | /// <summary> |
42 | /// Start a given script. | 44 | /// Start a given script. |
43 | /// </summary> | 45 | /// </summary> |
@@ -53,10 +55,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
53 | } | 55 | } |
54 | else | 56 | else |
55 | { | 57 | { |
56 | MainLog.Instance.Error( | 58 | m_log.Error(String.Format( |
57 | "PRIMINVENTORY", | 59 | "[PRIMINVENTORY]: " + |
58 | "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}", | 60 | "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}", |
59 | localID, Name, UUID, itemID); | 61 | localID, Name, UUID, itemID)); |
60 | } | 62 | } |
61 | } | 63 | } |
62 | 64 | ||
@@ -74,10 +76,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
74 | // } | 76 | // } |
75 | // else | 77 | // else |
76 | // { | 78 | // { |
77 | // MainLog.Instance.Error( | 79 | // m_log.Error(String.Format( |
78 | // "PRIMINVENTORY", | 80 | // "[PRIMINVENTORY]: " + |
79 | // "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}", | 81 | // "Couldn't find part {0} in object group {1}, {2} to start script with ID {3}", |
80 | // localID, Name, UUID, itemID); | 82 | // localID, Name, UUID, itemID)); |
81 | // } | 83 | // } |
82 | // } | 84 | // } |
83 | 85 | ||
@@ -106,10 +108,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
106 | } | 108 | } |
107 | else | 109 | else |
108 | { | 110 | { |
109 | MainLog.Instance.Error( | 111 | m_log.Error(String.Format( |
110 | "PRIMINVENTORY", | 112 | "[PRIMINVENTORY]: " + |
111 | "Couldn't find part {0} in object group {1}, {2} to stop script with ID {3}", | 113 | "Couldn't find part {0} in object group {1}, {2} to stop script with ID {3}", |
112 | partID, Name, UUID, itemID); | 114 | partID, Name, UUID, itemID)); |
113 | } | 115 | } |
114 | } | 116 | } |
115 | 117 | ||
@@ -127,10 +129,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
127 | } | 129 | } |
128 | else | 130 | else |
129 | { | 131 | { |
130 | MainLog.Instance.Error( | 132 | m_log.Error(String.Format( |
131 | "PRIMINVENTORY", | 133 | "[PRIMINVENTORY]: " + |
132 | "Couldn't find part {0} in object group {1}, {2} to retreive prim inventory", | 134 | "Couldn't find part {0} in object group {1}, {2} to retreive prim inventory", |
133 | localID, Name, UUID); | 135 | localID, Name, UUID)); |
134 | } | 136 | } |
135 | return false; | 137 | return false; |
136 | } | 138 | } |
@@ -144,10 +146,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
144 | } | 146 | } |
145 | else | 147 | else |
146 | { | 148 | { |
147 | MainLog.Instance.Error( | 149 | m_log.Error(String.Format( |
148 | "PRIMINVENTORY", | 150 | "[PRIMINVENTORY]: " + |
149 | "Couldn't find part {0} in object group {1}, {2} to request inventory data", | 151 | "Couldn't find part {0} in object group {1}, {2} to request inventory data", |
150 | localID, Name, UUID); | 152 | localID, Name, UUID)); |
151 | } | 153 | } |
152 | } | 154 | } |
153 | 155 | ||
@@ -183,10 +185,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
183 | } | 185 | } |
184 | else | 186 | else |
185 | { | 187 | { |
186 | MainLog.Instance.Error( | 188 | m_log.Error(String.Format( |
187 | "PRIMINVENTORY", | 189 | "[PRIMINVENTORY]: " + |
188 | "Couldn't find prim local ID {0} in group {1}, {2} to add inventory item ID {3}", | 190 | "Couldn't find prim local ID {0} in group {1}, {2} to add inventory item ID {3}", |
189 | localID, Name, UUID, newItemId); | 191 | localID, Name, UUID, newItemId)); |
190 | } | 192 | } |
191 | 193 | ||
192 | return false; | 194 | return false; |
@@ -207,10 +209,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
207 | } | 209 | } |
208 | else | 210 | else |
209 | { | 211 | { |
210 | MainLog.Instance.Error( | 212 | m_log.Error(String.Format( |
211 | "PRIMINVENTORY", | 213 | "[PRIMINVENTORY]: " + |
212 | "Couldn't find prim local ID {0} in prim {1}, {2} to get inventory item ID {3}", | 214 | "Couldn't find prim local ID {0} in prim {1}, {2} to get inventory item ID {3}", |
213 | primID, part.Name, part.UUID, itemID); | 215 | primID, part.Name, part.UUID, itemID)); |
214 | } | 216 | } |
215 | 217 | ||
216 | return null; | 218 | return null; |
@@ -233,10 +235,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
233 | } | 235 | } |
234 | else | 236 | else |
235 | { | 237 | { |
236 | MainLog.Instance.Error( | 238 | m_log.Error(String.Format( |
237 | "PRIMINVENTORY", | 239 | "[PRIMINVENTORY]: " + |
238 | "Couldn't find prim ID {0} to update item {1}, {2}", | 240 | "Couldn't find prim ID {0} to update item {1}, {2}", |
239 | item.ParentPartID, item.Name, item.ItemID); | 241 | item.ParentPartID, item.Name, item.ItemID)); |
240 | } | 242 | } |
241 | 243 | ||
242 | return false; | 244 | return false; |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs index 10395b6..4fe7b55 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectGroup.cs | |||
@@ -1003,9 +1003,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
1003 | } | 1003 | } |
1004 | else | 1004 | else |
1005 | { | 1005 | { |
1006 | MainLog.Instance.Verbose("SCENE", | 1006 | m_log.Info(String.Format("[SCENE]: " + |
1007 | "DelinkFromGroup(): Child prim local id {0} not found in object with root prim id {1}", | 1007 | "DelinkFromGroup(): Child prim local id {0} not found in object with root prim id {1}", |
1008 | partID, LocalId); | 1008 | partID, LocalId)); |
1009 | } | 1009 | } |
1010 | } | 1010 | } |
1011 | 1011 | ||
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs index d4e2102..d9ee94c 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.Inventory.cs | |||
@@ -41,6 +41,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
41 | { | 41 | { |
42 | public partial class SceneObjectPart : IScriptHost | 42 | public partial class SceneObjectPart : IScriptHost |
43 | { | 43 | { |
44 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
45 | |||
44 | private string m_inventoryFileName = String.Empty; | 46 | private string m_inventoryFileName = String.Empty; |
45 | 47 | ||
46 | /// <summary> | 48 | /// <summary> |
@@ -131,10 +133,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
131 | /// <returns></returns> | 133 | /// <returns></returns> |
132 | public void StartScript(TaskInventoryItem item) | 134 | public void StartScript(TaskInventoryItem item) |
133 | { | 135 | { |
134 | // MainLog.Instance.Verbose( | 136 | // m_log.Info(String.Format( |
135 | // "PRIMINVENTORY", | 137 | // "[PRIMINVENTORY]: " + |
136 | // "Starting script {0}, {1} in prim {2}, {3}", | 138 | // "Starting script {0}, {1} in prim {2}, {3}", |
137 | // item.Name, item.ItemID, Name, UUID); | 139 | // item.Name, item.ItemID, Name, UUID)); |
138 | 140 | ||
139 | AssetBase rezAsset = m_parentGroup.Scene.AssetCache.GetAsset(item.AssetID, false); | 141 | AssetBase rezAsset = m_parentGroup.Scene.AssetCache.GetAsset(item.AssetID, false); |
140 | 142 | ||
@@ -145,10 +147,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
145 | } | 147 | } |
146 | else | 148 | else |
147 | { | 149 | { |
148 | MainLog.Instance.Error( | 150 | m_log.Error(String.Format( |
149 | "PRIMINVENTORY", | 151 | "[PRIMINVENTORY]: " + |
150 | "Couldn't start script {0}, {1} since asset ID {2} could not be found", | 152 | "Couldn't start script {0}, {1} since asset ID {2} could not be found", |
151 | item.Name, item.ItemID, item.AssetID); | 153 | item.Name, item.ItemID, item.AssetID)); |
152 | } | 154 | } |
153 | } | 155 | } |
154 | 156 | ||
@@ -168,10 +170,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
168 | } | 170 | } |
169 | else | 171 | else |
170 | { | 172 | { |
171 | MainLog.Instance.Error( | 173 | m_log.Error(String.Format( |
172 | "PRIMINVENTORY", | 174 | "[PRIMINVENTORY]: " + |
173 | "Couldn't start script with ID {0} since it couldn't be found for prim {1}, {2}", | 175 | "Couldn't start script with ID {0} since it couldn't be found for prim {1}, {2}", |
174 | itemId, Name, UUID); | 176 | itemId, Name, UUID)); |
175 | } | 177 | } |
176 | } | 178 | } |
177 | } | 179 | } |
@@ -188,10 +190,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
188 | } | 190 | } |
189 | else | 191 | else |
190 | { | 192 | { |
191 | MainLog.Instance.Error( | 193 | m_log.Error(String.Format( |
192 | "PRIMINVENTORY", | 194 | "[PRIMINVENTORY]: " + |
193 | "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2}", | 195 | "Couldn't stop script with ID {0} since it couldn't be found for prim {1}, {2}", |
194 | itemId, Name, UUID); | 196 | itemId, Name, UUID)); |
195 | } | 197 | } |
196 | } | 198 | } |
197 | 199 | ||
@@ -251,10 +253,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
251 | } | 253 | } |
252 | else | 254 | else |
253 | { | 255 | { |
254 | MainLog.Instance.Error( | 256 | m_log.Error(String.Format( |
255 | "PRIMINVENTORY", | 257 | "[PRIMINVENTORY]: " + |
256 | "Tried to retrieve item ID {0} from prim {1}, {2} but the item does not exist in this inventory", | 258 | "Tried to retrieve item ID {0} from prim {1}, {2} but the item does not exist in this inventory", |
257 | itemID, Name, UUID); | 259 | itemID, Name, UUID)); |
258 | } | 260 | } |
259 | } | 261 | } |
260 | 262 | ||
@@ -283,10 +285,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
283 | } | 285 | } |
284 | else | 286 | else |
285 | { | 287 | { |
286 | MainLog.Instance.Error( | 288 | m_log.Error(String.Format( |
287 | "PRIMINVENTORY", | 289 | "[PRIMINVENTORY]: " + |
288 | "Tried to retrieve item ID {0} from prim {1}, {2} but the item does not exist in this inventory", | 290 | "Tried to retrieve item ID {0} from prim {1}, {2} but the item does not exist in this inventory", |
289 | item.ItemID, Name, UUID); | 291 | item.ItemID, Name, UUID)); |
290 | } | 292 | } |
291 | } | 293 | } |
292 | 294 | ||
@@ -316,10 +318,10 @@ namespace OpenSim.Region.Environment.Scenes | |||
316 | } | 318 | } |
317 | else | 319 | else |
318 | { | 320 | { |
319 | MainLog.Instance.Error( | 321 | m_log.Error(String.Format( |
320 | "PRIMINVENTORY", | 322 | "[PRIMINVENTORY]: " + |
321 | "Tried to remove item ID {0} from prim {1}, {2} but the item does not exist in this inventory", | 323 | "Tried to remove item ID {0} from prim {1}, {2} but the item does not exist in this inventory", |
322 | itemID, Name, UUID); | 324 | itemID, Name, UUID)); |
323 | } | 325 | } |
324 | } | 326 | } |
325 | 327 | ||
@@ -384,8 +386,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
384 | 386 | ||
385 | fileData = Helpers.StringToField(invString.BuildString); | 387 | fileData = Helpers.StringToField(invString.BuildString); |
386 | 388 | ||
387 | // MainLog.Instance.Verbose( | 389 | // m_log.Info(String.Format( |
388 | // "PRIMINVENTORY", "RequestInventoryFile fileData: {0}", Helpers.FieldToUTF8String(fileData)); | 390 | // "[PRIMINVENTORY]: RequestInventoryFile fileData: {0}", Helpers.FieldToUTF8String(fileData))); |
389 | 391 | ||
390 | if (fileData.Length > 2) | 392 | if (fileData.Length > 2) |
391 | { | 393 | { |
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 0ba64f2..4456fce 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -306,7 +306,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
306 | { | 306 | { |
307 | // Ignore, and skip over. | 307 | // Ignore, and skip over. |
308 | } | 308 | } |
309 | //MainLog.Instance.Verbose("PART", "OFFSET:" + m_offsetPosition, ToString()); | 309 | //m_log.Info("[PART]: OFFSET:" + m_offsetPosition.ToString()); |
310 | } | 310 | } |
311 | } | 311 | } |
312 | 312 | ||
@@ -347,14 +347,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
347 | if (ParentID == 0) | 347 | if (ParentID == 0) |
348 | { | 348 | { |
349 | PhysActor.Orientation = new Quaternion(value.W, value.X, value.Y, value.Z); | 349 | PhysActor.Orientation = new Quaternion(value.W, value.X, value.Y, value.Z); |
350 | //MainLog.Instance.Verbose("PART", "RO1:" + PhysActor.Orientation.ToString()); | 350 | //m_log.Info("[PART]: RO1:" + PhysActor.Orientation.ToString()); |
351 | } | 351 | } |
352 | else | 352 | else |
353 | { | 353 | { |
354 | // Child prim we have to calculate it's world rotationwel | 354 | // Child prim we have to calculate it's world rotationwel |
355 | LLQuaternion resultingrotation = GetWorldRotation(); | 355 | LLQuaternion resultingrotation = GetWorldRotation(); |
356 | PhysActor.Orientation = new Quaternion(resultingrotation.W, resultingrotation.X, resultingrotation.Y, resultingrotation.Z); | 356 | PhysActor.Orientation = new Quaternion(resultingrotation.W, resultingrotation.X, resultingrotation.Y, resultingrotation.Z); |
357 | //MainLog.Instance.Verbose("PART", "RO2:" + PhysActor.Orientation.ToString()); | 357 | //m_log.Info("[PART]: RO2:" + PhysActor.Orientation.ToString()); |
358 | } | 358 | } |
359 | m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); | 359 | m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); |
360 | //} | 360 | //} |
@@ -1554,14 +1554,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
1554 | // Are we the owner? | 1554 | // Are we the owner? |
1555 | if (AgentID == OwnerID) | 1555 | if (AgentID == OwnerID) |
1556 | { | 1556 | { |
1557 | MainLog.Instance.Verbose("PERMISSIONS", | 1557 | m_log.Info("[PERMISSIONS]: field: " + field.ToString() + ", mask: " + mask.ToString() + " addRemTF: " + |
1558 | "field: " + field.ToString() + ", mask: " + mask.ToString() + " addRemTF: " + | 1558 | addRemTF.ToString()); |
1559 | addRemTF.ToString()); | ||
1560 | 1559 | ||
1561 | //Field 8 = EveryoneMask | 1560 | //Field 8 = EveryoneMask |
1562 | if (field == (byte) 8) | 1561 | if (field == (byte) 8) |
1563 | { | 1562 | { |
1564 | MainLog.Instance.Verbose("PERMISSIONS", "Left over: " + (OwnerMask - EveryoneMask)); | 1563 | m_log.Info("[PERMISSIONS]: Left over: " + (OwnerMask - EveryoneMask)); |
1565 | if (addRemTF == (byte) 0) | 1564 | if (addRemTF == (byte) 0) |
1566 | { | 1565 | { |
1567 | //EveryoneMask = (uint)0; | 1566 | //EveryoneMask = (uint)0; |
@@ -1751,7 +1750,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1751 | 1750 | ||
1752 | public void PhysicsOutOfBounds(PhysicsVector pos) | 1751 | public void PhysicsOutOfBounds(PhysicsVector pos) |
1753 | { | 1752 | { |
1754 | MainLog.Instance.Verbose("PHYSICS", "Physical Object went out of bounds."); | 1753 | m_log.Info("[PHYSICS]: Physical Object went out of bounds."); |
1755 | RemFlag(LLObject.ObjectFlags.Physics); | 1754 | RemFlag(LLObject.ObjectFlags.Physics); |
1756 | DoPhysicsPropertyUpdate(false, true); | 1755 | DoPhysicsPropertyUpdate(false, true); |
1757 | m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); | 1756 | m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 659a1f5..5c33dfc 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -39,6 +39,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
39 | { | 39 | { |
40 | public class ScenePresence : EntityBase | 40 | public class ScenePresence : EntityBase |
41 | { | 41 | { |
42 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
43 | |||
42 | public static AvatarAnimations Animations; | 44 | public static AvatarAnimations Animations; |
43 | public static byte[] DefaultTexture; | 45 | public static byte[] DefaultTexture; |
44 | public LLUUID currentParcelUUID = LLUUID.Zero; | 46 | public LLUUID currentParcelUUID = LLUUID.Zero; |
@@ -345,7 +347,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
345 | } | 347 | } |
346 | catch (KeyNotFoundException) | 348 | catch (KeyNotFoundException) |
347 | { | 349 | { |
348 | MainLog.Instance.Warn("AVATAR", "KeyNotFound Exception playing avatar stand animation"); | 350 | m_log.Warn("[AVATAR]: KeyNotFound Exception playing avatar stand animation"); |
349 | } | 351 | } |
350 | m_animationSeqs.Add(1); | 352 | m_animationSeqs.Add(1); |
351 | 353 | ||
@@ -933,7 +935,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
933 | } | 935 | } |
934 | else | 936 | else |
935 | { | 937 | { |
936 | MainLog.Instance.Warn("Sit requested on unknown object: " + targetID.ToString()); | 938 | m_log.Warn("Sit requested on unknown object: " + targetID.ToString()); |
937 | } | 939 | } |
938 | SendSitResponse(remoteClient, targetID, offset); | 940 | SendSitResponse(remoteClient, targetID, offset); |
939 | } | 941 | } |
@@ -1047,7 +1049,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1047 | } | 1049 | } |
1048 | catch | 1050 | catch |
1049 | { | 1051 | { |
1050 | MainLog.Instance.Warn("AVATAR", "SetMovementAnimation for avatar failed. Attempting recovery..."); | 1052 | m_log.Warn("[AVATAR]: SetMovementAnimation for avatar failed. Attempting recovery..."); |
1051 | m_animations[0] = anim; | 1053 | m_animations[0] = anim; |
1052 | m_animationSeqs[0] = seq; | 1054 | m_animationSeqs[0] = seq; |
1053 | SendAnimPack(); | 1055 | SendAnimPack(); |
@@ -1184,13 +1186,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
1184 | //bool controlland = (((m_AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) || ((m_AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG) != 0)); | 1186 | //bool controlland = (((m_AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_UP_NEG) != 0) || ((m_AgentControlFlags & (uint)AgentManager.ControlFlags.AGENT_CONTROL_NUDGE_UP_NEG) != 0)); |
1185 | //bool colliding = (m_physicsActor.IsColliding==true); | 1187 | //bool colliding = (m_physicsActor.IsColliding==true); |
1186 | //if (controlland) | 1188 | //if (controlland) |
1187 | // MainLog.Instance.Verbose("AGENT","landCommand"); | 1189 | // m_log.Info("[AGENT]: landCommand"); |
1188 | //if (colliding ) | 1190 | //if (colliding ) |
1189 | // MainLog.Instance.Verbose("AGENT","colliding"); | 1191 | // m_log.Info("[AGENT]: colliding"); |
1190 | //if (m_physicsActor.Flying && colliding && controlland) | 1192 | //if (m_physicsActor.Flying && colliding && controlland) |
1191 | //{ | 1193 | //{ |
1192 | // StopFlying(); | 1194 | // StopFlying(); |
1193 | // MainLog.Instance.Verbose("AGENT", "Stop FLying"); | 1195 | // m_log.Info("[AGENT]: Stop FLying"); |
1194 | //} | 1196 | //} |
1195 | } | 1197 | } |
1196 | else | 1198 | else |
diff --git a/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineInterface.cs b/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineInterface.cs index d781806..5d432f5 100644 --- a/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineInterface.cs +++ b/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineInterface.cs | |||
@@ -33,7 +33,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting | |||
33 | { | 33 | { |
34 | public interface ScriptEngineInterface | 34 | public interface ScriptEngineInterface |
35 | { | 35 | { |
36 | void InitializeEngine(Scene Sceneworld, LogBase logger); | 36 | void InitializeEngine(Scene Sceneworld); |
37 | void Shutdown(); | 37 | void Shutdown(); |
38 | // void StartScript(string ScriptID, IScriptHost ObjectID); | 38 | // void StartScript(string ScriptID, IScriptHost ObjectID); |
39 | } | 39 | } |
diff --git a/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs b/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs index 74f9358..b52b2e9 100644 --- a/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs +++ b/OpenSim/Region/Environment/Scenes/Scripting/ScriptEngineLoader.cs | |||
@@ -35,12 +35,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting | |||
35 | { | 35 | { |
36 | public class ScriptEngineLoader | 36 | public class ScriptEngineLoader |
37 | { | 37 | { |
38 | private LogBase m_log; | 38 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
39 | |||
40 | public ScriptEngineLoader(LogBase logger) | ||
41 | { | ||
42 | m_log = logger; | ||
43 | } | ||
44 | 39 | ||
45 | public ScriptEngineInterface LoadScriptEngine(string EngineName) | 40 | public ScriptEngineInterface LoadScriptEngine(string EngineName) |
46 | { | 41 | { |
@@ -54,7 +49,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting | |||
54 | } | 49 | } |
55 | catch (Exception e) | 50 | catch (Exception e) |
56 | { | 51 | { |
57 | m_log.Error("ScriptEngine", | 52 | m_log.Error("[ScriptEngine]: " + |
58 | "Error loading assembly \"" + EngineName + "\": " + e.Message + ", " + | 53 | "Error loading assembly \"" + EngineName + "\": " + e.Message + ", " + |
59 | e.StackTrace.ToString()); | 54 | e.StackTrace.ToString()); |
60 | } | 55 | } |
@@ -88,7 +83,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting | |||
88 | //} | 83 | //} |
89 | //catch (Exception e) | 84 | //catch (Exception e) |
90 | //{ | 85 | //{ |
91 | // m_log.Error("ScriptEngine", "Error loading assembly \String.Empty + FileName + "\": " + e.ToString()); | 86 | // m_log.Error("[ScriptEngine]: Error loading assembly \String.Empty + FileName + "\": " + e.ToString()); |
92 | //} | 87 | //} |
93 | 88 | ||
94 | 89 | ||
@@ -105,7 +100,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting | |||
105 | //} | 100 | //} |
106 | //catch (Exception e) | 101 | //catch (Exception e) |
107 | //{ | 102 | //{ |
108 | // m_log.Error("ScriptEngine", "Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString()); | 103 | // m_log.Error("[ScriptEngine]: Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString()); |
109 | //} | 104 | //} |
110 | 105 | ||
111 | ScriptEngineInterface ret; | 106 | ScriptEngineInterface ret; |
@@ -115,7 +110,7 @@ namespace OpenSim.Region.Environment.Scenes.Scripting | |||
115 | //} | 110 | //} |
116 | //catch (Exception e) | 111 | //catch (Exception e) |
117 | //{ | 112 | //{ |
118 | // m_log.Error("ScriptEngine", "Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString()); | 113 | // m_log.Error("[ScriptEngine]: Error initializing type \String.Empty + NameSpace + "\" from \String.Empty + FileName + "\": " + e.ToString()); |
119 | //} | 114 | //} |
120 | 115 | ||
121 | return ret; | 116 | return ret; |
diff --git a/OpenSim/Region/Environment/StorageManager.cs b/OpenSim/Region/Environment/StorageManager.cs index 1c41373..f15bbdb 100644 --- a/OpenSim/Region/Environment/StorageManager.cs +++ b/OpenSim/Region/Environment/StorageManager.cs | |||
@@ -35,6 +35,8 @@ namespace OpenSim.Region.Environment | |||
35 | { | 35 | { |
36 | public class StorageManager | 36 | public class StorageManager |
37 | { | 37 | { |
38 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
39 | |||
38 | private IRegionDataStore m_dataStore; | 40 | private IRegionDataStore m_dataStore; |
39 | 41 | ||
40 | public IRegionDataStore DataStore | 42 | public IRegionDataStore DataStore |
@@ -49,7 +51,7 @@ namespace OpenSim.Region.Environment | |||
49 | 51 | ||
50 | public StorageManager(string dllName, string connectionstring, bool persistPrimInventories) | 52 | public StorageManager(string dllName, string connectionstring, bool persistPrimInventories) |
51 | { | 53 | { |
52 | MainLog.Instance.Verbose("DATASTORE", "Attempting to load " + dllName); | 54 | m_log.Info("[DATASTORE]: Attempting to load " + dllName); |
53 | Assembly pluginAssembly = Assembly.LoadFrom(dllName); | 55 | Assembly pluginAssembly = Assembly.LoadFrom(dllName); |
54 | 56 | ||
55 | foreach (Type pluginType in pluginAssembly.GetTypes()) | 57 | foreach (Type pluginType in pluginAssembly.GetTypes()) |
@@ -66,7 +68,7 @@ namespace OpenSim.Region.Environment | |||
66 | 68 | ||
67 | m_dataStore = plug; | 69 | m_dataStore = plug; |
68 | 70 | ||
69 | MainLog.Instance.Verbose("DATASTORE", "Added IRegionDataStore Interface"); | 71 | m_log.Info("[DATASTORE]: Added IRegionDataStore Interface"); |
70 | } | 72 | } |
71 | } | 73 | } |
72 | } | 74 | } |
diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs index 6c18540..f919276 100644 --- a/OpenSim/Region/Examples/SimpleApp/Program.cs +++ b/OpenSim/Region/Examples/SimpleApp/Program.cs | |||
@@ -51,9 +51,9 @@ namespace SimpleApp | |||
51 | private string m_userPlugin = "OpenSim.Framework.Data.SQLite.dll"; | 51 | private string m_userPlugin = "OpenSim.Framework.Data.SQLite.dll"; |
52 | private string m_inventoryPlugin = "OpenSim.Framework.Data.SQLite.dll"; | 52 | private string m_inventoryPlugin = "OpenSim.Framework.Data.SQLite.dll"; |
53 | 53 | ||
54 | protected override LogBase CreateLog() | 54 | protected override ConsoleBase CreateConsole() |
55 | { | 55 | { |
56 | return new LogBase(null, "SimpleApp", this, true); | 56 | return new ConsoleBase("SimpleApp", this); |
57 | } | 57 | } |
58 | 58 | ||
59 | protected override void Initialize() | 59 | protected override void Initialize() |
@@ -64,12 +64,12 @@ namespace SimpleApp | |||
64 | 64 | ||
65 | LocalAssetServer assetServer = new LocalAssetServer(); | 65 | LocalAssetServer assetServer = new LocalAssetServer(); |
66 | 66 | ||
67 | m_assetCache = new AssetCache(assetServer, m_log); | 67 | m_assetCache = new AssetCache(assetServer); |
68 | } | 68 | } |
69 | 69 | ||
70 | public void Run() | 70 | public void Run() |
71 | { | 71 | { |
72 | StartLog(); | 72 | StartConsole(); |
73 | StartUp(); | 73 | StartUp(); |
74 | 74 | ||
75 | LocalInventoryService inventoryService = new LocalInventoryService(); | 75 | LocalInventoryService inventoryService = new LocalInventoryService(); |
@@ -94,7 +94,7 @@ namespace SimpleApp | |||
94 | 94 | ||
95 | m_httpServer.AddXmlRPCHandler("login_to_simulator", loginService.XmlRpcLoginMethod); | 95 | m_httpServer.AddXmlRPCHandler("login_to_simulator", loginService.XmlRpcLoginMethod); |
96 | 96 | ||
97 | m_log.Notice(m_log.LineInfo); | 97 | m_console.Notice(m_console.LineInfo); |
98 | 98 | ||
99 | IPEndPoint internalEndPoint = | 99 | IPEndPoint internalEndPoint = |
100 | new IPEndPoint(IPAddress.Parse("127.0.0.1"), (int) m_networkServersInfo.HttpListenerPort); | 100 | new IPEndPoint(IPAddress.Parse("127.0.0.1"), (int) m_networkServersInfo.HttpListenerPort); |
@@ -104,7 +104,7 @@ namespace SimpleApp | |||
104 | 104 | ||
105 | UDPServer udpServer; | 105 | UDPServer udpServer; |
106 | 106 | ||
107 | m_moduleLoader = new ModuleLoader(m_log, m_config); | 107 | m_moduleLoader = new ModuleLoader(m_config); |
108 | m_moduleLoader.LoadDefaultSharedModules(); | 108 | m_moduleLoader.LoadDefaultSharedModules(); |
109 | 109 | ||
110 | Scene scene = SetupScene(regionInfo, out udpServer, false); | 110 | Scene scene = SetupScene(regionInfo, out udpServer, false); |
@@ -170,8 +170,8 @@ namespace SimpleApp | |||
170 | scene.AddEntity(fileObject); | 170 | scene.AddEntity(fileObject); |
171 | } | 171 | } |
172 | 172 | ||
173 | m_log.Notice("Press enter to quit."); | 173 | m_console.Notice("Press enter to quit."); |
174 | m_log.ReadLine(); | 174 | m_console.ReadLine(); |
175 | } | 175 | } |
176 | 176 | ||
177 | protected override Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager, | 177 | protected override Scene CreateScene(RegionInfo regionInfo, StorageManager storageManager, |
@@ -182,7 +182,7 @@ namespace SimpleApp | |||
182 | return | 182 | return |
183 | new MyWorld(regionInfo, circuitManager, permissionManager, m_commsManager, sceneGridService, | 183 | new MyWorld(regionInfo, circuitManager, permissionManager, m_commsManager, sceneGridService, |
184 | m_assetCache, storageManager, m_httpServer, | 184 | m_assetCache, storageManager, m_httpServer, |
185 | new ModuleLoader(m_log, m_config), true, false); | 185 | new ModuleLoader(m_config), true, false); |
186 | } | 186 | } |
187 | 187 | ||
188 | protected override StorageManager CreateStorageManager(string connectionstring) | 188 | protected override StorageManager CreateStorageManager(string connectionstring) |
@@ -211,6 +211,8 @@ namespace SimpleApp | |||
211 | 211 | ||
212 | private static void Main(string[] args) | 212 | private static void Main(string[] args) |
213 | { | 213 | { |
214 | log4net.Config.XmlConfigurator.Configure(); | ||
215 | |||
214 | Program app = new Program(); | 216 | Program app = new Program(); |
215 | 217 | ||
216 | app.Run(); | 218 | app.Run(); |
diff --git a/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/CSharpScriptEngine.cs b/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/CSharpScriptEngine.cs index b625f43..03d478f 100644 --- a/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/CSharpScriptEngine.cs +++ b/OpenSim/Region/ExtensionsScriptModule/Engines/CSharp/CSharpScriptEngine.cs | |||
@@ -35,6 +35,8 @@ namespace OpenSim.Region.ExtensionsScriptModule.CSharp | |||
35 | { | 35 | { |
36 | public class CSharpScriptEngine : IScriptCompiler | 36 | public class CSharpScriptEngine : IScriptCompiler |
37 | { | 37 | { |
38 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
39 | |||
38 | public string FileExt() | 40 | public string FileExt() |
39 | { | 41 | { |
40 | return ".cs"; | 42 | return ".cs"; |
@@ -58,10 +60,10 @@ namespace OpenSim.Region.ExtensionsScriptModule.CSharp | |||
58 | 60 | ||
59 | if (compilerResults.Errors.Count > 0) | 61 | if (compilerResults.Errors.Count > 0) |
60 | { | 62 | { |
61 | MainLog.Instance.Error("Compile errors"); | 63 | m_log.Error("Compile errors"); |
62 | foreach (CompilerError error in compilerResults.Errors) | 64 | foreach (CompilerError error in compilerResults.Errors) |
63 | { | 65 | { |
64 | MainLog.Instance.Error(error.Line.ToString() + ": " + error.ErrorText.ToString()); | 66 | m_log.Error(error.Line.ToString() + ": " + error.ErrorText.ToString()); |
65 | } | 67 | } |
66 | } | 68 | } |
67 | else | 69 | else |
diff --git a/OpenSim/Region/ExtensionsScriptModule/Engines/JScript/JScriptEngine.cs b/OpenSim/Region/ExtensionsScriptModule/Engines/JScript/JScriptEngine.cs index bc5c413..dbe0dca 100644 --- a/OpenSim/Region/ExtensionsScriptModule/Engines/JScript/JScriptEngine.cs +++ b/OpenSim/Region/ExtensionsScriptModule/Engines/JScript/JScriptEngine.cs | |||
@@ -35,6 +35,8 @@ namespace OpenSim.Region.ExtensionsScriptModule.JScript | |||
35 | { | 35 | { |
36 | public class JScriptEngine : IScriptCompiler | 36 | public class JScriptEngine : IScriptCompiler |
37 | { | 37 | { |
38 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
39 | |||
38 | public string FileExt() | 40 | public string FileExt() |
39 | { | 41 | { |
40 | return ".js"; | 42 | return ".js"; |
@@ -58,10 +60,10 @@ namespace OpenSim.Region.ExtensionsScriptModule.JScript | |||
58 | 60 | ||
59 | if (compilerResults.Errors.Count > 0) | 61 | if (compilerResults.Errors.Count > 0) |
60 | { | 62 | { |
61 | MainLog.Instance.Error("Compile errors"); | 63 | m_log.Error("Compile errors"); |
62 | foreach (CompilerError error in compilerResults.Errors) | 64 | foreach (CompilerError error in compilerResults.Errors) |
63 | { | 65 | { |
64 | MainLog.Instance.Error(error.Line.ToString() + ": " + error.ErrorText.ToString()); | 66 | m_log.Error(error.Line.ToString() + ": " + error.ErrorText.ToString()); |
65 | } | 67 | } |
66 | } | 68 | } |
67 | else | 69 | else |
diff --git a/OpenSim/Region/ExtensionsScriptModule/Script.cs b/OpenSim/Region/ExtensionsScriptModule/Script.cs index 0555277..d9d569b 100644 --- a/OpenSim/Region/ExtensionsScriptModule/Script.cs +++ b/OpenSim/Region/ExtensionsScriptModule/Script.cs | |||
@@ -53,12 +53,12 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
53 | 53 | ||
54 | private void events_OnNewPresence(ScenePresence presence) | 54 | private void events_OnNewPresence(ScenePresence presence) |
55 | { | 55 | { |
56 | script.logger.Verbose("TESTSCRIPT", "Hello " + presence.Firstname.ToString() + "!"); | 56 | script.Log.Info("[TESTSCRIPT]: Hello " + presence.Firstname.ToString() + "!"); |
57 | } | 57 | } |
58 | 58 | ||
59 | private void events_OnFrame() | 59 | private void events_OnFrame() |
60 | { | 60 | { |
61 | //script.logger.Verbose("TESTSCRIPT", "Hello World!"); | 61 | //script.logger.Info("[TESTSCRIPT]: Hello World!"); |
62 | } | 62 | } |
63 | } | 63 | } |
64 | } \ No newline at end of file | 64 | } |
diff --git a/OpenSim/Region/ExtensionsScriptModule/ScriptInfo.cs b/OpenSim/Region/ExtensionsScriptModule/ScriptInfo.cs index af54a4e..e90bfc1 100644 --- a/OpenSim/Region/ExtensionsScriptModule/ScriptInfo.cs +++ b/OpenSim/Region/ExtensionsScriptModule/ScriptInfo.cs | |||
@@ -36,23 +36,26 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
36 | /// </summary> | 36 | /// </summary> |
37 | public class ScriptInfo | 37 | public class ScriptInfo |
38 | { | 38 | { |
39 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
40 | |||
39 | // Reference to world.eventsManager provided for convenience | 41 | // Reference to world.eventsManager provided for convenience |
40 | public EventManager events; | 42 | public EventManager events; |
41 | 43 | ||
42 | // The main world | 44 | // The main world |
43 | public Scene world; | 45 | public Scene world; |
44 | 46 | ||
45 | // The console | ||
46 | public LogBase logger; | ||
47 | |||
48 | // API Access | 47 | // API Access |
49 | public ScriptAPI api; | 48 | public ScriptAPI api; |
50 | 49 | ||
50 | public log4net.ILog Log | ||
51 | { | ||
52 | get { return m_log; } | ||
53 | } | ||
54 | |||
51 | public ScriptInfo(Scene scene) | 55 | public ScriptInfo(Scene scene) |
52 | { | 56 | { |
53 | world = scene; | 57 | world = scene; |
54 | events = world.EventManager; | 58 | events = world.EventManager; |
55 | logger = MainLog.Instance; | ||
56 | api = new ScriptAPI(world, LLUUID.Zero); | 59 | api = new ScriptAPI(world, LLUUID.Zero); |
57 | } | 60 | } |
58 | 61 | ||
diff --git a/OpenSim/Region/ExtensionsScriptModule/ScriptInterpretedAPI.cs b/OpenSim/Region/ExtensionsScriptModule/ScriptInterpretedAPI.cs index b3a0d4f..0f50358 100644 --- a/OpenSim/Region/ExtensionsScriptModule/ScriptInterpretedAPI.cs +++ b/OpenSim/Region/ExtensionsScriptModule/ScriptInterpretedAPI.cs | |||
@@ -45,6 +45,8 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
45 | /// <remarks>Avoid at all costs. This should ONLY be used for LSL.</remarks> | 45 | /// <remarks>Avoid at all costs. This should ONLY be used for LSL.</remarks> |
46 | internal class ScriptInterpretedAPI | 46 | internal class ScriptInterpretedAPI |
47 | { | 47 | { |
48 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
49 | |||
48 | protected Key m_object; | 50 | protected Key m_object; |
49 | protected Scene m_scene; | 51 | protected Scene m_scene; |
50 | 52 | ||
@@ -109,7 +111,7 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
109 | { | 111 | { |
110 | //Dont do anything! | 112 | //Dont do anything! |
111 | } | 113 | } |
112 | MainLog.Instance.Warn("script", | 114 | m_log.Warn("[script]: " + |
113 | "Unimplemented function called by script: osAddToLandPassList(Key avatar, float hours)"); | 115 | "Unimplemented function called by script: osAddToLandPassList(Key avatar, float hours)"); |
114 | return; | 116 | return; |
115 | } | 117 | } |
@@ -117,7 +119,7 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
117 | [Obsolete("Unimplemented")] | 119 | [Obsolete("Unimplemented")] |
118 | public void osAdjustSoundVolume(float volume) | 120 | public void osAdjustSoundVolume(float volume) |
119 | { | 121 | { |
120 | MainLog.Instance.Warn("script", "Unimplemented function called by script: osAdjustSoundVolume(float volume)"); | 122 | m_log.Warn("[script]: Unimplemented function called by script: osAdjustSoundVolume(float volume)"); |
121 | return; | 123 | return; |
122 | } | 124 | } |
123 | 125 | ||
diff --git a/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs b/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs index d080ab8..6c2d940 100644 --- a/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs +++ b/OpenSim/Region/ExtensionsScriptModule/ScriptManager.cs | |||
@@ -38,6 +38,8 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
38 | { | 38 | { |
39 | public class ScriptManager : IRegionModule, IExtensionScriptModule | 39 | public class ScriptManager : IRegionModule, IExtensionScriptModule |
40 | { | 40 | { |
41 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
41 | private readonly List<IScript> scripts = new List<IScript>(); | 43 | private readonly List<IScript> scripts = new List<IScript>(); |
42 | private Scene m_scene; | 44 | private Scene m_scene; |
43 | private readonly Dictionary<string, IScriptCompiler> compilers = new Dictionary<string, IScriptCompiler>(); | 45 | private readonly Dictionary<string, IScriptCompiler> compilers = new Dictionary<string, IScriptCompiler>(); |
@@ -48,12 +50,12 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
48 | { | 50 | { |
49 | ScriptInfo scriptInfo = new ScriptInfo(m_scene); | 51 | ScriptInfo scriptInfo = new ScriptInfo(m_scene); |
50 | // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script. | 52 | // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script. |
51 | MainLog.Instance.Verbose("SCRIPT", "Loading " + script.Key); | 53 | m_log.Info("[SCRIPT]: Loading " + script.Key); |
52 | script.Value.Initialise(scriptInfo); | 54 | script.Value.Initialise(scriptInfo); |
53 | scripts.Add(script.Value); | 55 | scripts.Add(script.Value); |
54 | } | 56 | } |
55 | 57 | ||
56 | MainLog.Instance.Verbose("SCRIPT", string.Format("Finished loading {0} script(s)", compiledscripts.Count)); | 58 | m_log.Info("[SCRIPT]: " + string.Format("Finished loading {0} script(s)", compiledscripts.Count)); |
57 | } | 59 | } |
58 | 60 | ||
59 | public ScriptManager() | 61 | public ScriptManager() |
@@ -71,7 +73,7 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
71 | 73 | ||
72 | public void Initialise(Scene scene, IConfigSource config) | 74 | public void Initialise(Scene scene, IConfigSource config) |
73 | { | 75 | { |
74 | MainLog.Instance.Verbose("SCRIPTMODULE", "Initialising Extensions Scripting Module"); | 76 | m_log.Info("[SCRIPTMODULE]: Initialising Extensions Scripting Module"); |
75 | m_scene = scene; | 77 | m_scene = scene; |
76 | 78 | ||
77 | m_scene.RegisterModuleInterface<IExtensionScriptModule>(this); | 79 | m_scene.RegisterModuleInterface<IExtensionScriptModule>(this); |
@@ -118,14 +120,14 @@ namespace OpenSim.Region.ExtensionsScriptModule | |||
118 | break; | 120 | break; |
119 | 121 | ||
120 | default: | 122 | default: |
121 | MainLog.Instance.Error("Unknown script command"); | 123 | m_log.Error("Unknown script command"); |
122 | break; | 124 | break; |
123 | } | 125 | } |
124 | } | 126 | } |
125 | 127 | ||
126 | public bool AddPreCompiledScript(IScript script) | 128 | public bool AddPreCompiledScript(IScript script) |
127 | { | 129 | { |
128 | MainLog.Instance.Verbose("SCRIPT", "Loading script " + script.Name); | 130 | m_log.Info("[SCRIPT]: Loading script " + script.Name); |
129 | ScriptInfo scriptInfo = new ScriptInfo(m_scene); | 131 | ScriptInfo scriptInfo = new ScriptInfo(m_scene); |
130 | // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script. | 132 | // Since each script could potentially corrupt their access with a stray assignment, making a new one for each script. |
131 | script.Initialise(scriptInfo); | 133 | script.Initialise(scriptInfo); |
diff --git a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs index b76fbbf..919910c 100644 --- a/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/BasicPhysicsPlugin/AssemblyInfo.cs | |||
@@ -55,4 +55,4 @@ using System.Runtime.InteropServices; | |||
55 | // You can specify all values by your own or you can build default build and revision | 55 | // You can specify all values by your own or you can build default build and revision |
56 | // numbers with the '*' character (the default): | 56 | // numbers with the '*' character (the default): |
57 | 57 | ||
58 | [assembly : AssemblyVersion("1.0.*")] \ No newline at end of file | 58 | [assembly : AssemblyVersion("1.0.*")] |
diff --git a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs index f42fdf6..27ae490 100644 --- a/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs +++ b/OpenSim/Region/Physics/BulletXPlugin/BulletXPlugin.cs | |||
@@ -81,6 +81,8 @@ namespace OpenSim.Region.Physics.BulletXPlugin | |||
81 | /// </summary> | 81 | /// </summary> |
82 | public class BulletXMaths | 82 | public class BulletXMaths |
83 | { | 83 | { |
84 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
85 | |||
84 | //Vector3 | 86 | //Vector3 |
85 | public static Vector3 PhysicsVectorToXnaVector3(PhysicsVector physicsVector) | 87 | public static Vector3 PhysicsVectorToXnaVector3(PhysicsVector physicsVector) |
86 | { | 88 | { |
@@ -311,7 +313,7 @@ namespace OpenSim.Region.Physics.BulletXPlugin | |||
311 | 313 | ||
312 | bool needsCollision = base.NeedsCollision(bodyA, bodyB); | 314 | bool needsCollision = base.NeedsCollision(bodyA, bodyB); |
313 | 315 | ||
314 | //MainLog.Instance.Debug("BulletX", "A collision was detected between {0} and {1} --> {2}", nameA, nameB, | 316 | //m_log.Debug("[BulletX]: A collision was detected between {0} and {1} --> {2}", nameA, nameB, |
315 | //needsCollision); | 317 | //needsCollision); |
316 | 318 | ||
317 | 319 | ||
diff --git a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs index a4ac54f..acaa389b 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs | |||
@@ -38,6 +38,8 @@ namespace OpenSim.Region.Physics.Manager | |||
38 | /// </summary> | 38 | /// </summary> |
39 | public class PhysicsPluginManager | 39 | public class PhysicsPluginManager |
40 | { | 40 | { |
41 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
42 | |||
41 | private Dictionary<string, IPhysicsPlugin> _PhysPlugins = new Dictionary<string, IPhysicsPlugin>(); | 43 | private Dictionary<string, IPhysicsPlugin> _PhysPlugins = new Dictionary<string, IPhysicsPlugin>(); |
42 | private Dictionary<string, IMeshingPlugin> _MeshPlugins = new Dictionary<string, IMeshingPlugin>(); | 44 | private Dictionary<string, IMeshingPlugin> _MeshPlugins = new Dictionary<string, IMeshingPlugin>(); |
43 | 45 | ||
@@ -60,25 +62,25 @@ namespace OpenSim.Region.Physics.Manager | |||
60 | IMesher meshEngine = null; | 62 | IMesher meshEngine = null; |
61 | if (_MeshPlugins.ContainsKey(meshEngineName)) | 63 | if (_MeshPlugins.ContainsKey(meshEngineName)) |
62 | { | 64 | { |
63 | MainLog.Instance.Verbose("PHYSICS", "creating meshing engine " + meshEngineName); | 65 | m_log.Info("[PHYSICS]: creating meshing engine " + meshEngineName); |
64 | meshEngine = _MeshPlugins[meshEngineName].GetMesher(); | 66 | meshEngine = _MeshPlugins[meshEngineName].GetMesher(); |
65 | } | 67 | } |
66 | else | 68 | else |
67 | { | 69 | { |
68 | MainLog.Instance.Warn("PHYSICS", "couldn't find meshingEngine: {0}", meshEngineName); | 70 | m_log.Warn(String.Format("[PHYSICS]: couldn't find meshingEngine: {0}", meshEngineName)); |
69 | throw new ArgumentException(String.Format("couldn't find meshingEngine: {0}", meshEngineName)); | 71 | throw new ArgumentException(String.Format("couldn't find meshingEngine: {0}", meshEngineName)); |
70 | } | 72 | } |
71 | 73 | ||
72 | if (_PhysPlugins.ContainsKey(physEngineName)) | 74 | if (_PhysPlugins.ContainsKey(physEngineName)) |
73 | { | 75 | { |
74 | MainLog.Instance.Verbose("PHYSICS", "creating " + physEngineName); | 76 | m_log.Info("[PHYSICS]: creating " + physEngineName); |
75 | PhysicsScene result = _PhysPlugins[physEngineName].GetScene(); | 77 | PhysicsScene result = _PhysPlugins[physEngineName].GetScene(); |
76 | result.Initialise(meshEngine); | 78 | result.Initialise(meshEngine); |
77 | return result; | 79 | return result; |
78 | } | 80 | } |
79 | else | 81 | else |
80 | { | 82 | { |
81 | MainLog.Instance.Warn("PHYSICS", "couldn't find physicsEngine: {0}", physEngineName); | 83 | m_log.Warn(String.Format("[PHYSICS]: couldn't find physicsEngine: {0}", physEngineName)); |
82 | throw new ArgumentException(String.Format("couldn't find physicsEngine: {0}", physEngineName)); | 84 | throw new ArgumentException(String.Format("couldn't find physicsEngine: {0}", physEngineName)); |
83 | } | 85 | } |
84 | } | 86 | } |
@@ -89,7 +91,7 @@ namespace OpenSim.Region.Physics.Manager | |||
89 | IMeshingPlugin plugHard; | 91 | IMeshingPlugin plugHard; |
90 | plugHard = new ZeroMesherPlugin(); | 92 | plugHard = new ZeroMesherPlugin(); |
91 | _MeshPlugins.Add(plugHard.GetName(), plugHard); | 93 | _MeshPlugins.Add(plugHard.GetName(), plugHard); |
92 | MainLog.Instance.Verbose("PHYSICS", "Added meshing engine: " + plugHard.GetName()); | 94 | m_log.Info("[PHYSICS]: Added meshing engine: " + plugHard.GetName()); |
93 | 95 | ||
94 | // And now walk all assemblies (DLLs effectively) and see if they are home | 96 | // And now walk all assemblies (DLLs effectively) and see if they are home |
95 | // of a plugin that is of interest for us | 97 | // of a plugin that is of interest for us |
@@ -120,7 +122,7 @@ namespace OpenSim.Region.Physics.Manager | |||
120 | (IPhysicsPlugin) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | 122 | (IPhysicsPlugin) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); |
121 | plug.Init(); | 123 | plug.Init(); |
122 | _PhysPlugins.Add(plug.GetName(), plug); | 124 | _PhysPlugins.Add(plug.GetName(), plug); |
123 | MainLog.Instance.Verbose("PHYSICS", "Added physics engine: " + plug.GetName()); | 125 | m_log.Info("[PHYSICS]: Added physics engine: " + plug.GetName()); |
124 | } | 126 | } |
125 | 127 | ||
126 | Type meshTypeInterface = pluginType.GetInterface("IMeshingPlugin", true); | 128 | Type meshTypeInterface = pluginType.GetInterface("IMeshingPlugin", true); |
@@ -130,7 +132,7 @@ namespace OpenSim.Region.Physics.Manager | |||
130 | IMeshingPlugin plug = | 132 | IMeshingPlugin plug = |
131 | (IMeshingPlugin) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | 133 | (IMeshingPlugin) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); |
132 | _MeshPlugins.Add(plug.GetName(), plug); | 134 | _MeshPlugins.Add(plug.GetName(), plug); |
133 | MainLog.Instance.Verbose("PHYSICS", "Added meshing engine: " + plug.GetName()); | 135 | m_log.Info("[PHYSICS]: Added meshing engine: " + plug.GetName()); |
134 | } | 136 | } |
135 | 137 | ||
136 | physTypeInterface = null; | 138 | physTypeInterface = null; |
@@ -147,11 +149,11 @@ namespace OpenSim.Region.Physics.Manager | |||
147 | { | 149 | { |
148 | if (isWarning) | 150 | if (isWarning) |
149 | { | 151 | { |
150 | MainLog.Instance.Warn("PHYSICS", message); | 152 | m_log.Warn("[PHYSICS]: " + message); |
151 | } | 153 | } |
152 | else | 154 | else |
153 | { | 155 | { |
154 | MainLog.Instance.Verbose("PHYSICS", message); | 156 | m_log.Info("[PHYSICS]: " + message); |
155 | } | 157 | } |
156 | } | 158 | } |
157 | 159 | ||
@@ -171,4 +173,4 @@ namespace OpenSim.Region.Physics.Manager | |||
171 | string GetName(); | 173 | string GetName(); |
172 | IMesher GetMesher(); | 174 | IMesher GetMesher(); |
173 | } | 175 | } |
174 | } \ No newline at end of file | 176 | } |
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs index 37481f1..bd2ad99 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs | |||
@@ -25,6 +25,7 @@ | |||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | using System; | ||
28 | using Axiom.Math; | 29 | using Axiom.Math; |
29 | using OpenSim.Framework; | 30 | using OpenSim.Framework; |
30 | using OpenSim.Framework.Console; | 31 | using OpenSim.Framework.Console; |
@@ -35,6 +36,8 @@ namespace OpenSim.Region.Physics.Manager | |||
35 | 36 | ||
36 | public abstract class PhysicsScene | 37 | public abstract class PhysicsScene |
37 | { | 38 | { |
39 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
40 | |||
38 | // The only thing that should register for this event is the InnerScene | 41 | // The only thing that should register for this event is the InnerScene |
39 | // Anything else could cause problems. | 42 | // Anything else could cause problems. |
40 | 43 | ||
@@ -92,7 +95,7 @@ namespace OpenSim.Region.Physics.Manager | |||
92 | 95 | ||
93 | public override PhysicsActor AddAvatar(string avName, PhysicsVector position) | 96 | public override PhysicsActor AddAvatar(string avName, PhysicsVector position) |
94 | { | 97 | { |
95 | MainLog.Instance.Verbose("PHYSICS", "NullPhysicsScene : AddAvatar({0})", position); | 98 | m_log.Info(String.Format("[PHYSICS]: NullPhysicsScene : AddAvatar({0})", position)); |
96 | return PhysicsActor.Null; | 99 | return PhysicsActor.Null; |
97 | } | 100 | } |
98 | 101 | ||
@@ -107,7 +110,7 @@ namespace OpenSim.Region.Physics.Manager | |||
107 | /* | 110 | /* |
108 | public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size, Quaternion rotation) | 111 | public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size, Quaternion rotation) |
109 | { | 112 | { |
110 | MainLog.Instance.Verbose("NullPhysicsScene : AddPrim({0},{1})", position, size); | 113 | m_log.Info(String.Format("NullPhysicsScene : AddPrim({0},{1})", position, size)); |
111 | return PhysicsActor.Null; | 114 | return PhysicsActor.Null; |
112 | } | 115 | } |
113 | */ | 116 | */ |
@@ -121,7 +124,7 @@ namespace OpenSim.Region.Physics.Manager | |||
121 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, | 124 | public override PhysicsActor AddPrimShape(string primName, PrimitiveBaseShape pbs, PhysicsVector position, |
122 | PhysicsVector size, Quaternion rotation, bool isPhysical) | 125 | PhysicsVector size, Quaternion rotation, bool isPhysical) |
123 | { | 126 | { |
124 | MainLog.Instance.Verbose("PHYSICS", "NullPhysicsScene : AddPrim({0},{1})", position, size); | 127 | m_log.Info(String.Format("[PHYSICS]: NullPhysicsScene : AddPrim({0},{1})", position, size)); |
125 | return PhysicsActor.Null; | 128 | return PhysicsActor.Null; |
126 | } | 129 | } |
127 | 130 | ||
@@ -131,20 +134,19 @@ namespace OpenSim.Region.Physics.Manager | |||
131 | 134 | ||
132 | public override float Simulate(float timeStep) | 135 | public override float Simulate(float timeStep) |
133 | { | 136 | { |
134 | m_workIndicator = (m_workIndicator + 1)%10; | 137 | m_workIndicator = (m_workIndicator + 1) % 10; |
135 | 138 | ||
136 | //MainLog.Instance.SetStatus(m_workIndicator.ToString()); | ||
137 | return 0f; | 139 | return 0f; |
138 | } | 140 | } |
139 | 141 | ||
140 | public override void GetResults() | 142 | public override void GetResults() |
141 | { | 143 | { |
142 | MainLog.Instance.Verbose("PHYSICS", "NullPhysicsScene : GetResults()"); | 144 | m_log.Info("[PHYSICS]: NullPhysicsScene : GetResults()"); |
143 | } | 145 | } |
144 | 146 | ||
145 | public override void SetTerrain(float[] heightMap) | 147 | public override void SetTerrain(float[] heightMap) |
146 | { | 148 | { |
147 | MainLog.Instance.Verbose("PHYSICS", "NullPhysicsScene : SetTerrain({0} items)", heightMap.Length); | 149 | m_log.Info(String.Format("[PHYSICS]: NullPhysicsScene : SetTerrain({0} items)", heightMap.Length)); |
148 | } | 150 | } |
149 | 151 | ||
150 | public override void DeleteTerrain() | 152 | public override void DeleteTerrain() |
diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index 3217dd8..d4c9926 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs | |||
@@ -53,6 +53,8 @@ namespace OpenSim.Region.Physics.Meshing | |||
53 | 53 | ||
54 | public class Meshmerizer : IMesher | 54 | public class Meshmerizer : IMesher |
55 | { | 55 | { |
56 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
57 | |||
56 | // Setting baseDir to a path will enable the dumping of raw files | 58 | // Setting baseDir to a path will enable the dumping of raw files |
57 | // raw files can be imported by blender so a visual inspection of the results can be done | 59 | // raw files can be imported by blender so a visual inspection of the results can be done |
58 | // const string baseDir = "rawFiles"; | 60 | // const string baseDir = "rawFiles"; |
@@ -101,7 +103,6 @@ namespace OpenSim.Region.Physics.Meshing | |||
101 | return influenced; | 103 | return influenced; |
102 | } | 104 | } |
103 | 105 | ||
104 | |||
105 | private static void InsertVertices(List<Vertex> vertices, int usedForSeed, List<Triangle> triangles) | 106 | private static void InsertVertices(List<Vertex> vertices, int usedForSeed, List<Triangle> triangles) |
106 | { | 107 | { |
107 | // This is a variant of the delaunay algorithm | 108 | // This is a variant of the delaunay algorithm |
@@ -174,7 +175,6 @@ namespace OpenSim.Region.Physics.Meshing | |||
174 | } | 175 | } |
175 | } | 176 | } |
176 | 177 | ||
177 | |||
178 | private static Mesh CreateBoxMesh(String primName, PrimitiveBaseShape primShape, PhysicsVector size) | 178 | private static Mesh CreateBoxMesh(String primName, PrimitiveBaseShape primShape, PhysicsVector size) |
179 | // Builds the z (+ and -) surfaces of a box shaped prim | 179 | // Builds the z (+ and -) surfaces of a box shaped prim |
180 | { | 180 | { |
@@ -236,7 +236,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
236 | // Calculated separately to avoid errors | 236 | // Calculated separately to avoid errors |
237 | cutHull.AddVertex(legEnd); | 237 | cutHull.AddVertex(legEnd); |
238 | 238 | ||
239 | MainLog.Instance.Debug("Starting cutting of the hollow shape from the prim {1}", 0, primName); | 239 | m_log.Debug(String.Format("Starting cutting of the hollow shape from the prim {1}", 0, primName)); |
240 | SimpleHull cuttedHull = SimpleHull.SubtractHull(outerHull, cutHull); | 240 | SimpleHull cuttedHull = SimpleHull.SubtractHull(outerHull, cutHull); |
241 | 241 | ||
242 | outerHull = cuttedHull; | 242 | outerHull = cuttedHull; |
diff --git a/OpenSim/Region/Physics/Meshing/SimpleHull.cs b/OpenSim/Region/Physics/Meshing/SimpleHull.cs index 4532bda..9209860 100644 --- a/OpenSim/Region/Physics/Meshing/SimpleHull.cs +++ b/OpenSim/Region/Physics/Meshing/SimpleHull.cs | |||
@@ -42,6 +42,8 @@ namespace OpenSim.Region.Physics.Meshing | |||
42 | // is defined by the hull lies inside or outside the simplex chain | 42 | // is defined by the hull lies inside or outside the simplex chain |
43 | public class SimpleHull | 43 | public class SimpleHull |
44 | { | 44 | { |
45 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | |||
45 | private List<Vertex> vertices = new List<Vertex>(); | 47 | private List<Vertex> vertices = new List<Vertex>(); |
46 | private List<Vertex> holeVertices = new List<Vertex>(); // Only used, when the hull is hollow | 48 | private List<Vertex> holeVertices = new List<Vertex>(); // Only used, when the hull is hollow |
47 | 49 | ||
@@ -243,9 +245,9 @@ namespace OpenSim.Region.Physics.Meshing | |||
243 | SimpleHull otherHullClone = otherHull.Clone(); | 245 | SimpleHull otherHullClone = otherHull.Clone(); |
244 | bool intersects = false; | 246 | bool intersects = false; |
245 | 247 | ||
246 | MainLog.Instance.Debug("State before intersection detection"); | 248 | m_log.Debug("State before intersection detection"); |
247 | MainLog.Instance.Debug("The baseHull is:\n{1}", 0, baseHullClone.ToString()); | 249 | m_log.Debug(String.Format("The baseHull is:\n{1}", 0, baseHullClone.ToString())); |
248 | MainLog.Instance.Debug("The otherHull is:\n{1}", 0, otherHullClone.ToString()); | 250 | m_log.Debug(String.Format("The otherHull is:\n{1}", 0, otherHullClone.ToString())); |
249 | 251 | ||
250 | { | 252 | { |
251 | int iBase, iOther; | 253 | int iBase, iOther; |
@@ -274,8 +276,8 @@ namespace OpenSim.Region.Physics.Meshing | |||
274 | } | 276 | } |
275 | } | 277 | } |
276 | 278 | ||
277 | MainLog.Instance.Debug("State after intersection detection for the base hull"); | 279 | m_log.Debug("State after intersection detection for the base hull"); |
278 | MainLog.Instance.Debug("The baseHull is:\n{1}", 0, baseHullClone.ToString()); | 280 | m_log.Debug(String.Format("The baseHull is:\n{1}", 0, baseHullClone.ToString())); |
279 | 281 | ||
280 | { | 282 | { |
281 | int iOther, iBase; | 283 | int iOther, iBase; |
@@ -303,8 +305,8 @@ namespace OpenSim.Region.Physics.Meshing | |||
303 | } | 305 | } |
304 | } | 306 | } |
305 | 307 | ||
306 | MainLog.Instance.Debug("State after intersection detection for the base hull"); | 308 | m_log.Debug("State after intersection detection for the base hull"); |
307 | MainLog.Instance.Debug("The otherHull is:\n{1}", 0, otherHullClone.ToString()); | 309 | m_log.Debug(String.Format("The otherHull is:\n{1}", 0, otherHullClone.ToString())); |
308 | 310 | ||
309 | 311 | ||
310 | bool otherIsInBase = baseHullClone.containsPointsFrom(otherHullClone); | 312 | bool otherIsInBase = baseHullClone.containsPointsFrom(otherHullClone); |
@@ -387,7 +389,7 @@ namespace OpenSim.Region.Physics.Meshing | |||
387 | done = true; | 389 | done = true; |
388 | } | 390 | } |
389 | 391 | ||
390 | MainLog.Instance.Debug("The resulting Hull is:\n{1}", 0, result.ToString()); | 392 | m_log.Debug(String.Format("The resulting Hull is:\n{1}", 0, result.ToString())); |
391 | 393 | ||
392 | return result; | 394 | return result; |
393 | } | 395 | } |
diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index a21b7eb..98069a0 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | |||
@@ -56,6 +56,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
56 | } | 56 | } |
57 | public class OdeCharacter : PhysicsActor | 57 | public class OdeCharacter : PhysicsActor |
58 | { | 58 | { |
59 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
60 | |||
59 | private PhysicsVector _position; | 61 | private PhysicsVector _position; |
60 | private d.Vector3 _zeroPosition; | 62 | private d.Vector3 _zeroPosition; |
61 | private d.Matrix3 m_StandUpRotation; | 63 | private d.Matrix3 m_StandUpRotation; |
@@ -357,7 +359,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
357 | //capsuleradius = 0.2f; | 359 | //capsuleradius = 0.2f; |
358 | 360 | ||
359 | CAPSULE_LENGTH = (SetSize.Z - ((SetSize.Z*0.52f))); // subtract 43% of the size | 361 | CAPSULE_LENGTH = (SetSize.Z - ((SetSize.Z*0.52f))); // subtract 43% of the size |
360 | OpenSim.Framework.Console.MainLog.Instance.Verbose("SIZE", CAPSULE_LENGTH.ToString()); | 362 | m_log.Info("[SIZE]: " + CAPSULE_LENGTH.ToString()); |
361 | d.BodyDestroy(Body); | 363 | d.BodyDestroy(Body); |
362 | 364 | ||
363 | _parent_scene.waitForSpaceUnlock(_parent_scene.space); | 365 | _parent_scene.waitForSpaceUnlock(_parent_scene.space); |
@@ -440,7 +442,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
440 | //d.QfromR( | 442 | //d.QfromR( |
441 | //d.Matrix3 checkrotation = new d.Matrix3(0.7071068,0.5, -0.7071068, | 443 | //d.Matrix3 checkrotation = new d.Matrix3(0.7071068,0.5, -0.7071068, |
442 | // | 444 | // |
443 | //OpenSim.Framework.Console.MainLog.Instance.Verbose("PHYSICSAV", "Rotation: " + bodyrotation.M00 + " : " + bodyrotation.M01 + " : " + bodyrotation.M02 + " : " + bodyrotation.M10 + " : " + bodyrotation.M11 + " : " + bodyrotation.M12 + " : " + bodyrotation.M20 + " : " + bodyrotation.M21 + " : " + bodyrotation.M22); | 445 | //m_log.Info("[PHYSICSAV]: Rotation: " + bodyrotation.M00 + " : " + bodyrotation.M01 + " : " + bodyrotation.M02 + " : " + bodyrotation.M10 + " : " + bodyrotation.M11 + " : " + bodyrotation.M12 + " : " + bodyrotation.M20 + " : " + bodyrotation.M21 + " : " + bodyrotation.M22); |
444 | //standupStraight(); | 446 | //standupStraight(); |
445 | 447 | ||
446 | 448 | ||
@@ -479,7 +481,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
479 | d.BodyAddForceAtRelPos(Body, 0.0f, 0.0f, servo, 0.0f, 0.0f, 1.0f); | 481 | d.BodyAddForceAtRelPos(Body, 0.0f, 0.0f, servo, 0.0f, 0.0f, 1.0f); |
480 | d.BodyAddForceAtRelPos(Body, 0.0f, 0.0f, -servo, 0.0f, 0.0f, -1.0f); | 482 | d.BodyAddForceAtRelPos(Body, 0.0f, 0.0f, -servo, 0.0f, 0.0f, -1.0f); |
481 | //d.Matrix3 bodyrotation = d.BodyGetRotation(Body); | 483 | //d.Matrix3 bodyrotation = d.BodyGetRotation(Body); |
482 | //OpenSim.Framework.Console.MainLog.Instance.Verbose("PHYSICSAV", "Rotation: " + bodyrotation.M00 + " : " + bodyrotation.M01 + " : " + bodyrotation.M02 + " : " + bodyrotation.M10 + " : " + bodyrotation.M11 + " : " + bodyrotation.M12 + " : " + bodyrotation.M20 + " : " + bodyrotation.M21 + " : " + bodyrotation.M22); | 484 | //m_log.Info("[PHYSICSAV]: Rotation: " + bodyrotation.M00 + " : " + bodyrotation.M01 + " : " + bodyrotation.M02 + " : " + bodyrotation.M10 + " : " + bodyrotation.M11 + " : " + bodyrotation.M12 + " : " + bodyrotation.M20 + " : " + bodyrotation.M21 + " : " + bodyrotation.M22); |
483 | } | 485 | } |
484 | 486 | ||
485 | public override PhysicsVector Force | 487 | public override PhysicsVector Force |
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 93ba29e..690e9d3 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | |||
@@ -37,6 +37,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
37 | { | 37 | { |
38 | public class OdePrim : PhysicsActor | 38 | public class OdePrim : PhysicsActor |
39 | { | 39 | { |
40 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
41 | |||
40 | public PhysicsVector _position; | 42 | public PhysicsVector _position; |
41 | private PhysicsVector _velocity; | 43 | private PhysicsVector _velocity; |
42 | private PhysicsVector m_lastVelocity = new PhysicsVector(0.0f, 0.0f, 0.0f); | 44 | private PhysicsVector m_lastVelocity = new PhysicsVector(0.0f, 0.0f, 0.0f); |
@@ -530,7 +532,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
530 | } | 532 | } |
531 | else | 533 | else |
532 | { | 534 | { |
533 | OpenSim.Framework.Console.MainLog.Instance.Verbose("PHYSICS", "Failed to load a sphere bad size"); | 535 | m_log.Info("[PHYSICS]: Failed to load a sphere bad size"); |
534 | _parent_scene.waitForSpaceUnlock(m_targetSpace); | 536 | _parent_scene.waitForSpaceUnlock(m_targetSpace); |
535 | prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z); | 537 | prim_geom = d.CreateBox(m_targetSpace, _size.X, _size.Y, _size.Z); |
536 | } | 538 | } |
@@ -683,7 +685,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
683 | { | 685 | { |
684 | lock (m_forcelist) | 686 | lock (m_forcelist) |
685 | { | 687 | { |
686 | //OpenSim.Framework.Console.MainLog.Instance.Verbose("PHYSICS", "dequeing forcelist"); | 688 | //m_log.Info("[PHYSICS]: dequeing forcelist"); |
687 | if (IsPhysical) | 689 | if (IsPhysical) |
688 | { | 690 | { |
689 | PhysicsVector iforce = new PhysicsVector(); | 691 | PhysicsVector iforce = new PhysicsVector(); |
@@ -747,7 +749,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
747 | get { return _position; } | 749 | get { return _position; } |
748 | 750 | ||
749 | set { _position = value; | 751 | set { _position = value; |
750 | //OpenSim.Framework.Console.MainLog.Instance.Verbose("PHYSICS", _position.ToString()); | 752 | //m_log.Info("[PHYSICS]: " + _position.ToString()); |
751 | } | 753 | } |
752 | } | 754 | } |
753 | 755 | ||
@@ -824,7 +826,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
824 | { | 826 | { |
825 | m_forcelist.Add(force); | 827 | m_forcelist.Add(force); |
826 | m_taintforce = true; | 828 | m_taintforce = true; |
827 | //OpenSim.Framework.Console.MainLog.Instance.Verbose("PHYSICS", "Added Force:" + force.ToString() + " to prim at " + Position.ToString()); | 829 | //m_log.Info("[PHYSICS]: Added Force:" + force.ToString() + " to prim at " + Position.ToString()); |
828 | } | 830 | } |
829 | 831 | ||
830 | public override PhysicsVector RotationalVelocity | 832 | public override PhysicsVector RotationalVelocity |
diff --git a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs index bff2c80..9cf6d50 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdePlugin.cs | |||
@@ -44,6 +44,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
44 | /// </summary> | 44 | /// </summary> |
45 | public class OdePlugin : IPhysicsPlugin | 45 | public class OdePlugin : IPhysicsPlugin |
46 | { | 46 | { |
47 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
48 | |||
47 | private OdeScene _mScene; | 49 | private OdeScene _mScene; |
48 | 50 | ||
49 | public OdePlugin() | 51 | public OdePlugin() |
@@ -76,6 +78,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
76 | 78 | ||
77 | public class OdeScene : PhysicsScene | 79 | public class OdeScene : PhysicsScene |
78 | { | 80 | { |
81 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
82 | |||
79 | // TODO: this should be hard-coded in some common place | 83 | // TODO: this should be hard-coded in some common place |
80 | private const uint m_regionWidth = 256; | 84 | private const uint m_regionWidth = 256; |
81 | private const uint m_regionHeight = 256; | 85 | private const uint m_regionHeight = 256; |
@@ -284,7 +288,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
284 | 288 | ||
285 | //if (id == d.GeomClassID.TriMeshClass) | 289 | //if (id == d.GeomClassID.TriMeshClass) |
286 | //{ | 290 | //{ |
287 | // MainLog.Instance.Verbose("near: A collision was detected between {1} and {2}", 0, name1, name2); | 291 | // m_log.Info("near: A collision was detected between {1} and {2}", 0, name1, name2); |
288 | //System.Console.WriteLine("near: A collision was detected between {1} and {2}", 0, name1, name2); | 292 | //System.Console.WriteLine("near: A collision was detected between {1} and {2}", 0, name1, name2); |
289 | //} | 293 | //} |
290 | 294 | ||
@@ -296,8 +300,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
296 | } | 300 | } |
297 | catch (SEHException) | 301 | catch (SEHException) |
298 | { | 302 | { |
299 | MainLog.Instance.Error("PHYSICS", | 303 | m_log.Error("[PHYSICS]: The Operating system shut down ODE because of corrupt memory. This could be a result of really irregular terrain. If this repeats continuously, restart using Basic Physics and terrain fill your terrain. Restarting the sim."); |
300 | "The Operating system shut down ODE because of corrupt memory. This could be a result of really irregular terrain. If this repeats continuously, restart using Basic Physics and terrain fill your terrain. Restarting the sim."); | ||
301 | base.TriggerPhysicsBasedRestart(); | 304 | base.TriggerPhysicsBasedRestart(); |
302 | } | 305 | } |
303 | 306 | ||
@@ -352,7 +355,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
352 | 355 | ||
353 | if (contacts[i].depth >= 1.00f) | 356 | if (contacts[i].depth >= 1.00f) |
354 | { | 357 | { |
355 | //MainLog.Instance.Debug("PHYSICS",contacts[i].depth.ToString()); | 358 | //m_log.Debug("[PHYSICS]: " +contacts[i].depth.ToString()); |
356 | } | 359 | } |
357 | 360 | ||
358 | //If you interpenetrate a prim with an agent | 361 | //If you interpenetrate a prim with an agent |
@@ -405,7 +408,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
405 | } | 408 | } |
406 | if (contacts[i].depth >= 1.00f) | 409 | if (contacts[i].depth >= 1.00f) |
407 | { | 410 | { |
408 | //OpenSim.Framework.Console.MainLog.Instance.Verbose("P", contacts[i].depth.ToString()); | 411 | //m_log.Info("[P]: " + contacts[i].depth.ToString()); |
409 | if ((p2.PhysicsActorType == (int) ActorTypes.Agent && | 412 | if ((p2.PhysicsActorType == (int) ActorTypes.Agent && |
410 | p1.PhysicsActorType == (int) ActorTypes.Unknown) || | 413 | p1.PhysicsActorType == (int) ActorTypes.Unknown) || |
411 | (p1.PhysicsActorType == (int) ActorTypes.Agent && | 414 | (p1.PhysicsActorType == (int) ActorTypes.Agent && |
@@ -654,9 +657,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
654 | } | 657 | } |
655 | else | 658 | else |
656 | { | 659 | { |
657 | MainLog.Instance.Verbose("Physics", | 660 | m_log.Info("[Physics]: Invalid Scene passed to 'removeprim from scene':" + |
658 | "Invalid Scene passed to 'removeprim from scene':" + | 661 | ((OdePrim) prim).m_targetSpace.ToString()); |
659 | ((OdePrim) prim).m_targetSpace.ToString()); | ||
660 | } | 662 | } |
661 | } | 663 | } |
662 | } | 664 | } |
@@ -678,9 +680,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
678 | } | 680 | } |
679 | else | 681 | else |
680 | { | 682 | { |
681 | MainLog.Instance.Verbose("Physics", | 683 | m_log.Info("[Physics]: Invalid Scene passed to 'removeprim from scene':" + |
682 | "Invalid Scene passed to 'removeprim from scene':" + | 684 | ((OdePrim) prim).m_targetSpace.ToString()); |
683 | ((OdePrim) prim).m_targetSpace.ToString()); | ||
684 | } | 685 | } |
685 | } | 686 | } |
686 | } | 687 | } |
@@ -742,9 +743,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
742 | } | 743 | } |
743 | else | 744 | else |
744 | { | 745 | { |
745 | MainLog.Instance.Verbose("Physics", | 746 | m_log.Info("[Physics]: Invalid Scene passed to 'recalculatespace':" + currentspace.ToString() + |
746 | "Invalid Scene passed to 'recalculatespace':" + currentspace.ToString() + | 747 | " Geom:" + geom.ToString()); |
747 | " Geom:" + geom.ToString()); | ||
748 | } | 748 | } |
749 | } | 749 | } |
750 | else | 750 | else |
@@ -761,9 +761,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
761 | } | 761 | } |
762 | else | 762 | else |
763 | { | 763 | { |
764 | MainLog.Instance.Verbose("Physics", | 764 | m_log.Info("[Physics]: Invalid Scene passed to 'recalculatespace':" + |
765 | "Invalid Scene passed to 'recalculatespace':" + | 765 | sGeomIsIn.ToString() + " Geom:" + geom.ToString()); |
766 | sGeomIsIn.ToString() + " Geom:" + geom.ToString()); | ||
767 | } | 766 | } |
768 | } | 767 | } |
769 | } | 768 | } |
@@ -787,9 +786,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
787 | } | 786 | } |
788 | else | 787 | else |
789 | { | 788 | { |
790 | MainLog.Instance.Verbose("Physics", | 789 | m_log.Info("[Physics]: Invalid Scene passed to 'recalculatespace':" + |
791 | "Invalid Scene passed to 'recalculatespace':" + | 790 | currentspace.ToString() + " Geom:" + geom.ToString()); |
792 | currentspace.ToString() + " Geom:" + geom.ToString()); | ||
793 | } | 791 | } |
794 | } | 792 | } |
795 | } | 793 | } |
@@ -807,9 +805,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
807 | } | 805 | } |
808 | else | 806 | else |
809 | { | 807 | { |
810 | MainLog.Instance.Verbose("Physics", | 808 | m_log.Info("[Physics]: Invalid Scene passed to 'recalculatespace':" + |
811 | "Invalid Scene passed to 'recalculatespace':" + | 809 | currentspace.ToString() + " Geom:" + geom.ToString()); |
812 | currentspace.ToString() + " Geom:" + geom.ToString()); | ||
813 | } | 810 | } |
814 | } | 811 | } |
815 | else | 812 | else |
@@ -826,9 +823,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
826 | } | 823 | } |
827 | else | 824 | else |
828 | { | 825 | { |
829 | MainLog.Instance.Verbose("Physics", | 826 | m_log.Info("[Physics]: Invalid Scene passed to 'recalculatespace':" + |
830 | "Invalid Scene passed to 'recalculatespace':" + | 827 | sGeomIsIn.ToString() + " Geom:" + geom.ToString()); |
831 | sGeomIsIn.ToString() + " Geom:" + geom.ToString()); | ||
832 | } | 828 | } |
833 | } | 829 | } |
834 | } | 830 | } |
@@ -876,7 +872,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
876 | IntPtr locationbasedspace =IntPtr.Zero; | 872 | IntPtr locationbasedspace =IntPtr.Zero; |
877 | 873 | ||
878 | int[] xyspace = calculateSpaceArrayItemFromPos(pos); | 874 | int[] xyspace = calculateSpaceArrayItemFromPos(pos); |
879 | //MainLog.Instance.Verbose("Physics", "Attempting to use arrayItem: " + xyspace[0].ToString() + "," + xyspace[1].ToString()); | 875 | //m_log.Info("[Physics]: Attempting to use arrayItem: " + xyspace[0].ToString() + "," + xyspace[1].ToString()); |
880 | locationbasedspace = staticPrimspace[xyspace[0], xyspace[1]]; | 876 | locationbasedspace = staticPrimspace[xyspace[0], xyspace[1]]; |
881 | 877 | ||
882 | //locationbasedspace = space; | 878 | //locationbasedspace = space; |
@@ -970,7 +966,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
970 | name2 = "null"; | 966 | name2 = "null"; |
971 | } | 967 | } |
972 | 968 | ||
973 | MainLog.Instance.Verbose("TriArrayCallback: A collision was detected between {1} and {2}", 0, name1, name2); | 969 | m_log.Info("TriArrayCallback: A collision was detected between {1} and {2}", 0, name1, name2); |
974 | */ | 970 | */ |
975 | return 1; | 971 | return 1; |
976 | } | 972 | } |
@@ -984,19 +980,20 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
984 | { | 980 | { |
985 | name1 = "null"; | 981 | name1 = "null"; |
986 | } | 982 | } |
983 | |||
987 | if (!geom_name_map.TryGetValue(refObject, out name2)) | 984 | if (!geom_name_map.TryGetValue(refObject, out name2)) |
988 | { | 985 | { |
989 | name2 = "null"; | 986 | name2 = "null"; |
990 | } | 987 | } |
991 | 988 | ||
992 | // MainLog.Instance.Verbose("TriCallback: A collision was detected between {1} and {2}. Index was {3}", 0, name1, name2, triangleIndex); | 989 | // m_log.Info("TriCallback: A collision was detected between {1} and {2}. Index was {3}", 0, name1, name2, triangleIndex); |
993 | 990 | ||
994 | d.Vector3 v0 = new d.Vector3(); | 991 | d.Vector3 v0 = new d.Vector3(); |
995 | d.Vector3 v1 = new d.Vector3(); | 992 | d.Vector3 v1 = new d.Vector3(); |
996 | d.Vector3 v2 = new d.Vector3(); | 993 | d.Vector3 v2 = new d.Vector3(); |
997 | 994 | ||
998 | d.GeomTriMeshGetTriangle(trimesh, 0, ref v0, ref v1, ref v2); | 995 | d.GeomTriMeshGetTriangle(trimesh, 0, ref v0, ref v1, ref v2); |
999 | // MainLog.Instance.Debug("Triangle {0} is <{1},{2},{3}>, <{4},{5},{6}>, <{7},{8},{9}>", triangleIndex, v0.X, v0.Y, v0.Z, v1.X, v1.Y, v1.Z, v2.X, v2.Y, v2.Z); | 996 | // m_log.Debug("Triangle {0} is <{1},{2},{3}>, <{4},{5},{6}>, <{7},{8},{9}>", triangleIndex, v0.X, v0.Y, v0.Z, v1.X, v1.Y, v1.Z, v2.X, v2.Y, v2.Z); |
1000 | 997 | ||
1001 | return 1; | 998 | return 1; |
1002 | } | 999 | } |
@@ -1105,19 +1102,16 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1105 | } | 1102 | } |
1106 | catch (StackOverflowException) | 1103 | catch (StackOverflowException) |
1107 | { | 1104 | { |
1108 | MainLog.Instance.Error("PHYSICS", | 1105 | m_log.Error("[PHYSICS]: The operating system wasn't able to allocate enough memory for the simulation. Restarting the sim."); |
1109 | "The operating system wasn't able to allocate enough memory for the simulation. Restarting the sim."); | ||
1110 | base.TriggerPhysicsBasedRestart(); | 1106 | base.TriggerPhysicsBasedRestart(); |
1111 | } | 1107 | } |
1112 | 1108 | ||
1113 | int i = 0; | 1109 | int i = 0; |
1114 | 1110 | ||
1115 | |||
1116 | // Figure out the Frames Per Second we're going at. | 1111 | // Figure out the Frames Per Second we're going at. |
1117 | //(step_time == 0.004f, there's 250 of those per second. Times the step time/step size | 1112 | //(step_time == 0.004f, there's 250 of those per second. Times the step time/step size |
1118 | fps = (step_time/ODE_STEPSIZE) * 1000; | 1113 | fps = (step_time/ODE_STEPSIZE) * 1000; |
1119 | 1114 | ||
1120 | |||
1121 | while (step_time > 0.0f) | 1115 | while (step_time > 0.0f) |
1122 | { | 1116 | { |
1123 | foreach (OdeCharacter actor in _characters) | 1117 | foreach (OdeCharacter actor in _characters) |
@@ -1126,7 +1120,6 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1126 | actor.collidelock = true; | 1120 | actor.collidelock = true; |
1127 | } | 1121 | } |
1128 | 1122 | ||
1129 | |||
1130 | collision_optimized(timeStep); | 1123 | collision_optimized(timeStep); |
1131 | d.WorldQuickStep(world, ODE_STEPSIZE); | 1124 | d.WorldQuickStep(world, ODE_STEPSIZE); |
1132 | d.JointGroupEmpty(contactgroup); | 1125 | d.JointGroupEmpty(contactgroup); |
@@ -1178,8 +1171,8 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1178 | 1171 | ||
1179 | public override bool IsThreaded | 1172 | public override bool IsThreaded |
1180 | { | 1173 | { |
1181 | get { return (false); // for now we won't be multithreaded | 1174 | // for now we won't be multithreaded |
1182 | } | 1175 | get { return (false); } |
1183 | } | 1176 | } |
1184 | public float[] ResizeTerrain512NearestNeighbour(float[] heightMap) | 1177 | public float[] ResizeTerrain512NearestNeighbour(float[] heightMap) |
1185 | { | 1178 | { |
@@ -1275,6 +1268,7 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1275 | } | 1268 | } |
1276 | } | 1269 | } |
1277 | } | 1270 | } |
1271 | |||
1278 | //Flatten out the array | 1272 | //Flatten out the array |
1279 | int i = 0; | 1273 | int i = 0; |
1280 | for (int y = 0; y < 512; y++) | 1274 | for (int y = 0; y < 512; y++) |
diff --git a/OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs index 3bb71d4..da9f587 100644 --- a/OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/POSPlugin/AssemblyInfo.cs | |||
@@ -55,4 +55,4 @@ using System.Runtime.InteropServices; | |||
55 | // You can specify all values by your own or you can build default build and revision | 55 | // You can specify all values by your own or you can build default build and revision |
56 | // numbers with the '*' character (the default): | 56 | // numbers with the '*' character (the default): |
57 | 57 | ||
58 | [assembly : AssemblyVersion("1.0.*")] \ No newline at end of file | 58 | [assembly : AssemblyVersion("1.0.*")] |
diff --git a/OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs b/OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs index 36cb952..8e6d2a6 100644 --- a/OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs +++ b/OpenSim/Region/Physics/PhysXPlugin/AssemblyInfo.cs | |||
@@ -55,4 +55,4 @@ using System.Runtime.InteropServices; | |||
55 | // You can specify all values by your own or you can build default build and revision | 55 | // You can specify all values by your own or you can build default build and revision |
56 | // numbers with the '*' character (the default): | 56 | // numbers with the '*' character (the default): |
57 | 57 | ||
58 | [assembly : AssemblyVersion("1.0.*")] \ No newline at end of file | 58 | [assembly : AssemblyVersion("1.0.*")] |
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BaseClass.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BaseClass.cs index 8511b56..3a38497 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BaseClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BaseClass.cs | |||
@@ -41,7 +41,6 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
41 | { | 41 | { |
42 | public class LSL_BaseClass : MarshalByRefObject, LSL_BuiltIn_Commands_Interface, IScript | 42 | public class LSL_BaseClass : MarshalByRefObject, LSL_BuiltIn_Commands_Interface, IScript |
43 | { | 43 | { |
44 | |||
45 | // | 44 | // |
46 | // Included as base for any LSL-script that is compiled. | 45 | // Included as base for any LSL-script that is compiled. |
47 | // Any function added here will be accessible to the LSL script. But it must also be added to "LSL_BuiltIn_Commands_Interface" in "OpenSim.Region.ScriptEngine.Common" class. | 46 | // Any function added here will be accessible to the LSL script. But it must also be added to "LSL_BuiltIn_Commands_Interface" in "OpenSim.Region.ScriptEngine.Common" class. |
@@ -49,6 +48,8 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
49 | // Security note: This script will be running inside an restricted AppDomain. Currently AppDomain is not very restricted. | 48 | // Security note: This script will be running inside an restricted AppDomain. Currently AppDomain is not very restricted. |
50 | // | 49 | // |
51 | 50 | ||
51 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
52 | |||
52 | // Object never expires | 53 | // Object never expires |
53 | public override Object InitializeLifetimeService() | 54 | public override Object InitializeLifetimeService() |
54 | { | 55 | { |
@@ -112,7 +113,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
112 | { | 113 | { |
113 | m_LSL_Functions = LSL_Functions; | 114 | m_LSL_Functions = LSL_Functions; |
114 | 115 | ||
115 | //MainLog.Instance.Notice(ScriptEngineName, "LSL_BaseClass.Start() called."); | 116 | //m_log.Info(ScriptEngineName, "LSL_BaseClass.Start() called."); |
116 | 117 | ||
117 | // Get this AppDomain's settings and display some of them. | 118 | // Get this AppDomain's settings and display some of them. |
118 | AppDomainSetup ads = AppDomain.CurrentDomain.SetupInformation; | 119 | AppDomainSetup ads = AppDomain.CurrentDomain.SetupInformation; |
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs index 242bd27..66475c3 100644 --- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs +++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | |||
@@ -43,12 +43,13 @@ using OpenSim.Region.ScriptEngine.Common.ScriptEngineBase; | |||
43 | 43 | ||
44 | namespace OpenSim.Region.ScriptEngine.Common | 44 | namespace OpenSim.Region.ScriptEngine.Common |
45 | { | 45 | { |
46 | |||
47 | /// <summary> | 46 | /// <summary> |
48 | /// Contains all LSL ll-functions. This class will be in Default AppDomain. | 47 | /// Contains all LSL ll-functions. This class will be in Default AppDomain. |
49 | /// </summary> | 48 | /// </summary> |
50 | public class LSL_BuiltIn_Commands : MarshalByRefObject, LSL_BuiltIn_Commands_Interface | 49 | public class LSL_BuiltIn_Commands : MarshalByRefObject, LSL_BuiltIn_Commands_Interface |
51 | { | 50 | { |
51 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
52 | |||
52 | private ASCIIEncoding enc = new ASCIIEncoding(); | 53 | private ASCIIEncoding enc = new ASCIIEncoding(); |
53 | private ScriptEngineBase.ScriptEngine m_ScriptEngine; | 54 | private ScriptEngineBase.ScriptEngine m_ScriptEngine; |
54 | private SceneObjectPart m_host; | 55 | private SceneObjectPart m_host; |
@@ -63,7 +64,7 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
63 | m_localID = localID; | 64 | m_localID = localID; |
64 | m_itemID = itemID; | 65 | m_itemID = itemID; |
65 | 66 | ||
66 | //MainLog.Instance.Notice(ScriptEngineName, "LSL_BaseClass.Start() called. Hosted by [" + m_host.Name + ":" + m_host.UUID + "@" + m_host.AbsolutePosition + "]"); | 67 | //m_log.Info(ScriptEngineName, "LSL_BaseClass.Start() called. Hosted by [" + m_host.Name + ":" + m_host.UUID + "@" + m_host.AbsolutePosition + "]"); |
67 | } | 68 | } |
68 | 69 | ||
69 | private DateTime m_timer = DateTime.Now; | 70 | private DateTime m_timer = DateTime.Now; |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs index 2ed0529..0fb8d75 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/AppDomainManager.cs | |||
@@ -26,7 +26,6 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | |||
30 | using System; | 29 | using System; |
31 | using System.Collections; | 30 | using System.Collections; |
32 | using System.Collections.Generic; | 31 | using System.Collections.Generic; |
@@ -37,7 +36,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
37 | { | 36 | { |
38 | public class AppDomainManager : iScriptEngineFunctionModule | 37 | public class AppDomainManager : iScriptEngineFunctionModule |
39 | { | 38 | { |
40 | |||
41 | // | 39 | // |
42 | // This class does AppDomain handling and loading/unloading of scripts in it. | 40 | // This class does AppDomain handling and loading/unloading of scripts in it. |
43 | // It is instanced in "ScriptEngine" and controlled from "ScriptManager" | 41 | // It is instanced in "ScriptEngine" and controlled from "ScriptManager" |
@@ -48,7 +46,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
48 | // 4. Unload AppDomain completely when all scripts in it has stopped | 46 | // 4. Unload AppDomain completely when all scripts in it has stopped |
49 | // | 47 | // |
50 | 48 | ||
51 | |||
52 | private int maxScriptsPerAppDomain = 1; | 49 | private int maxScriptsPerAppDomain = 1; |
53 | 50 | ||
54 | /// <summary> | 51 | /// <summary> |
@@ -149,8 +146,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
149 | ads.ConfigurationFile = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile; | 146 | ads.ConfigurationFile = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile; |
150 | 147 | ||
151 | AppDomain AD = AppDomain.CreateDomain("ScriptAppDomain_" + AppDomainNameCount, null, ads); | 148 | AppDomain AD = AppDomain.CreateDomain("ScriptAppDomain_" + AppDomainNameCount, null, ads); |
152 | m_scriptEngine.Log.Verbose(m_scriptEngine.ScriptEngineName, "AppDomain Loading: " + | 149 | m_scriptEngine.Log.Info("[" + m_scriptEngine.ScriptEngineName + "]: AppDomain Loading: " + |
153 | AssemblyName.GetAssemblyName("OpenSim.Region.ScriptEngine.Common.dll").ToString()); | 150 | AssemblyName.GetAssemblyName("OpenSim.Region.ScriptEngine.Common.dll").ToString()); |
154 | AD.Load(AssemblyName.GetAssemblyName("OpenSim.Region.ScriptEngine.Common.dll")); | 151 | AD.Load(AssemblyName.GetAssemblyName("OpenSim.Region.ScriptEngine.Common.dll")); |
155 | 152 | ||
156 | // Return the new AppDomain | 153 | // Return the new AppDomain |
@@ -183,7 +180,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
183 | // Unload | 180 | // Unload |
184 | AppDomain.Unload(ads.CurrentAppDomain); | 181 | AppDomain.Unload(ads.CurrentAppDomain); |
185 | #if DEBUG | 182 | #if DEBUG |
186 | m_scriptEngine.Log.Verbose(m_scriptEngine.ScriptEngineName, "AppDomain unload freed " + (m - GC.GetTotalMemory(true)) + " bytes of memory"); | 183 | m_scriptEngine.Log.Info("[" + m_scriptEngine.ScriptEngineName + "]: AppDomain unload freed " + (m - GC.GetTotalMemory(true)) + " bytes of memory"); |
187 | #endif | 184 | #endif |
188 | } | 185 | } |
189 | } | 186 | } |
@@ -191,14 +188,13 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
191 | } // lock | 188 | } // lock |
192 | } | 189 | } |
193 | 190 | ||
194 | |||
195 | public IScript LoadScript(string FileName) | 191 | public IScript LoadScript(string FileName) |
196 | { | 192 | { |
197 | // Find next available AppDomain to put it in | 193 | // Find next available AppDomain to put it in |
198 | AppDomainStructure FreeAppDomain = GetFreeAppDomain(); | 194 | AppDomainStructure FreeAppDomain = GetFreeAppDomain(); |
199 | 195 | ||
200 | #if DEBUG | 196 | #if DEBUG |
201 | m_scriptEngine.Log.Verbose(m_scriptEngine.ScriptEngineName, "Loading into AppDomain: " + FileName); | 197 | m_scriptEngine.Log.Info("[" + m_scriptEngine.ScriptEngineName + "]: Loading into AppDomain: " + FileName); |
202 | #endif | 198 | #endif |
203 | IScript mbrt = | 199 | IScript mbrt = |
204 | (IScript) | 200 | (IScript) |
@@ -220,7 +216,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
220 | lock (freeLock) | 216 | lock (freeLock) |
221 | { | 217 | { |
222 | #if DEBUG | 218 | #if DEBUG |
223 | m_scriptEngine.Log.Verbose(m_scriptEngine.ScriptEngineName, "Stopping script in AppDomain"); | 219 | m_scriptEngine.Log.Info("[" + m_scriptEngine.ScriptEngineName + "]: Stopping script in AppDomain"); |
224 | #endif | 220 | #endif |
225 | // Check if it is current AppDomain | 221 | // Check if it is current AppDomain |
226 | if (currentAD.CurrentAppDomain == ad) | 222 | if (currentAD.CurrentAppDomain == ad) |
@@ -244,6 +240,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
244 | 240 | ||
245 | UnloadAppDomains(); // Outsite lock, has its own GetLock | 241 | UnloadAppDomains(); // Outsite lock, has its own GetLock |
246 | } | 242 | } |
243 | |||
247 | /// <summary> | 244 | /// <summary> |
248 | /// If set to true then threads and stuff should try to make a graceful exit | 245 | /// If set to true then threads and stuff should try to make a graceful exit |
249 | /// </summary> | 246 | /// </summary> |
@@ -253,6 +250,5 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
253 | set { _PleaseShutdown = value; } | 250 | set { _PleaseShutdown = value; } |
254 | } | 251 | } |
255 | private bool _PleaseShutdown = false; | 252 | private bool _PleaseShutdown = false; |
256 | |||
257 | } | 253 | } |
258 | } \ No newline at end of file | 254 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/Common.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/Common.cs index fe6dfcd..e99f0a7 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/Common.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/Common.cs | |||
@@ -26,7 +26,6 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | |||
30 | namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | 29 | namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase |
31 | { | 30 | { |
32 | public static class Common | 31 | public static class Common |
@@ -36,23 +35,23 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
36 | 35 | ||
37 | // This class just contains some static log stuff used for debugging. | 36 | // This class just contains some static log stuff used for debugging. |
38 | 37 | ||
39 | //public delegate void SendToDebugEventDelegate(string Message); | 38 | //public delegate void SendToDebugEventDelegate(string message); |
40 | //public delegate void SendToLogEventDelegate(string Message); | 39 | //public delegate void SendToLogEventDelegate(string message); |
41 | //static public event SendToDebugEventDelegate SendToDebugEvent; | 40 | //static public event SendToDebugEventDelegate SendToDebugEvent; |
42 | //static public event SendToLogEventDelegate SendToLogEvent; | 41 | //static public event SendToLogEventDelegate SendToLogEvent; |
43 | 42 | ||
44 | public static void SendToDebug(string Message) | 43 | public static void SendToDebug(string message) |
45 | { | 44 | { |
46 | //if (Debug == true) | 45 | //if (Debug == true) |
47 | mySE.Log.Verbose(mySE.ScriptEngineName, "Debug: " + Message); | 46 | mySE.Log.Info("[" + mySE.ScriptEngineName + "]: Debug: " + message); |
48 | //SendToDebugEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message); | 47 | //SendToDebugEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + message); |
49 | } | 48 | } |
50 | 49 | ||
51 | public static void SendToLog(string Message) | 50 | public static void SendToLog(string message) |
52 | { | 51 | { |
53 | //if (Debug == true) | 52 | //if (Debug == true) |
54 | mySE.Log.Verbose(mySE.ScriptEngineName, "LOG: " + Message); | 53 | mySE.Log.Info("[" + mySE.ScriptEngineName + "]: LOG: " + message); |
55 | //SendToLogEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message); | 54 | //SendToLogEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + message); |
56 | } | 55 | } |
57 | } | 56 | } |
58 | } \ No newline at end of file | 57 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs index 678c3d0..1de010a 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs | |||
@@ -39,7 +39,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
39 | [Serializable] | 39 | [Serializable] |
40 | public class EventManager : OpenSim.Region.ScriptEngine.Common.ScriptServerInterfaces.RemoteEvents, iScriptEngineFunctionModule | 40 | public class EventManager : OpenSim.Region.ScriptEngine.Common.ScriptServerInterfaces.RemoteEvents, iScriptEngineFunctionModule |
41 | { | 41 | { |
42 | |||
43 | // | 42 | // |
44 | // Class is instanced in "ScriptEngine" and Uses "EventQueueManager" that is also instanced in "ScriptEngine". | 43 | // Class is instanced in "ScriptEngine" and Uses "EventQueueManager" that is also instanced in "ScriptEngine". |
45 | // This class needs a bit of explaining: | 44 | // This class needs a bit of explaining: |
@@ -65,7 +64,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
65 | // We may not want to do it because someone is controlling us and will deliver events to us | 64 | // We may not want to do it because someone is controlling us and will deliver events to us |
66 | if (performHookUp) | 65 | if (performHookUp) |
67 | { | 66 | { |
68 | myScriptEngine.Log.Verbose(myScriptEngine.ScriptEngineName, "Hooking up to server events"); | 67 | myScriptEngine.Log.Info("[" + myScriptEngine.ScriptEngineName + "]: Hooking up to server events"); |
69 | myScriptEngine.World.EventManager.OnObjectGrab += touch_start; | 68 | myScriptEngine.World.EventManager.OnObjectGrab += touch_start; |
70 | myScriptEngine.World.EventManager.OnRezScript += OnRezScript; | 69 | myScriptEngine.World.EventManager.OnRezScript += OnRezScript; |
71 | myScriptEngine.World.EventManager.OnRemoveScript += OnRemoveScript; | 70 | myScriptEngine.World.EventManager.OnRemoveScript += OnRemoveScript; |
@@ -78,7 +77,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
78 | { | 77 | { |
79 | } | 78 | } |
80 | 79 | ||
81 | |||
82 | public void changed(uint localID, uint change) | 80 | public void changed(uint localID, uint change) |
83 | { | 81 | { |
84 | // Add to queue for all scripts in localID, Object pass change. | 82 | // Add to queue for all scripts in localID, Object pass change. |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs index e1b1b6c..5e06fcd 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueManager.cs | |||
@@ -44,7 +44,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
44 | [Serializable] | 44 | [Serializable] |
45 | public class EventQueueManager : iScriptEngineFunctionModule | 45 | public class EventQueueManager : iScriptEngineFunctionModule |
46 | { | 46 | { |
47 | |||
48 | // | 47 | // |
49 | // Class is instanced in "ScriptEngine" and used by "EventManager" also instanced in "ScriptEngine". | 48 | // Class is instanced in "ScriptEngine" and used by "EventManager" also instanced in "ScriptEngine". |
50 | // | 49 | // |
@@ -256,16 +255,15 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
256 | 255 | ||
257 | #endregion | 256 | #endregion |
258 | 257 | ||
259 | |||
260 | #region " Start / stop script execution threads (ThreadClasses) " | 258 | #region " Start / stop script execution threads (ThreadClasses) " |
261 | private void StartNewThreadClass() | 259 | private void StartNewThreadClass() |
262 | { | 260 | { |
263 | EventQueueThreadClass eqtc = new EventQueueThreadClass(this); | 261 | EventQueueThreadClass eqtc = new EventQueueThreadClass(this); |
264 | eventQueueThreads.Add(eqtc); | 262 | eventQueueThreads.Add(eqtc); |
265 | staticGlobalEventQueueThreads.Add(eqtc); | 263 | staticGlobalEventQueueThreads.Add(eqtc); |
266 | m_ScriptEngine.Log.Debug(m_ScriptEngine.ScriptEngineName, "Started new script execution thread. Current thread count: " + eventQueueThreads.Count); | 264 | m_ScriptEngine.Log.Debug("[" + m_ScriptEngine.ScriptEngineName + "]: Started new script execution thread. Current thread count: " + eventQueueThreads.Count); |
267 | |||
268 | } | 265 | } |
266 | |||
269 | private void AbortThreadClass(EventQueueThreadClass threadClass) | 267 | private void AbortThreadClass(EventQueueThreadClass threadClass) |
270 | { | 268 | { |
271 | if (eventQueueThreads.Contains(threadClass)) | 269 | if (eventQueueThreads.Contains(threadClass)) |
@@ -279,10 +277,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
279 | } | 277 | } |
280 | catch (Exception ex) | 278 | catch (Exception ex) |
281 | { | 279 | { |
282 | m_ScriptEngine.Log.Error(m_ScriptEngine.ScriptEngineName + ":EventQueueManager", "If you see this, could you please report it to Tedd:"); | 280 | m_ScriptEngine.Log.Error("[" + m_ScriptEngine.ScriptEngineName + ":EventQueueManager]: If you see this, could you please report it to Tedd:"); |
283 | m_ScriptEngine.Log.Error(m_ScriptEngine.ScriptEngineName + ":EventQueueManager", "Script thread execution timeout kill ended in exception: " + ex.ToString()); | 281 | m_ScriptEngine.Log.Error("[" + m_ScriptEngine.ScriptEngineName + ":EventQueueManager]: Script thread execution timeout kill ended in exception: " + ex.ToString()); |
284 | } | 282 | } |
285 | m_ScriptEngine.Log.Debug(m_ScriptEngine.ScriptEngineName, "Killed script execution thread. Remaining thread count: " + eventQueueThreads.Count); | 283 | m_ScriptEngine.Log.Debug("[" + m_ScriptEngine.ScriptEngineName + "]: Killed script execution thread. Remaining thread count: " + eventQueueThreads.Count); |
286 | } | 284 | } |
287 | #endregion | 285 | #endregion |
288 | 286 | ||
@@ -334,8 +332,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
334 | public void AddToObjectQueue(uint localID, string FunctionName, Queue_llDetectParams_Struct qParams, params object[] param) | 332 | public void AddToObjectQueue(uint localID, string FunctionName, Queue_llDetectParams_Struct qParams, params object[] param) |
335 | { | 333 | { |
336 | // Determine all scripts in Object and add to their queue | 334 | // Determine all scripts in Object and add to their queue |
337 | //myScriptEngine.m_logger.Verbose(ScriptEngineName, "EventQueueManager Adding localID: " + localID + ", FunctionName: " + FunctionName); | 335 | //myScriptEngine.log.Info("[" + ScriptEngineName + "]: EventQueueManager Adding localID: " + localID + ", FunctionName: " + FunctionName); |
338 | |||
339 | 336 | ||
340 | // Do we have any scripts in this object at all? If not, return | 337 | // Do we have any scripts in this object at all? If not, return |
341 | if (m_ScriptEngine.m_ScriptManager.Scripts.ContainsKey(localID) == false) | 338 | if (m_ScriptEngine.m_ScriptManager.Scripts.ContainsKey(localID) == false) |
@@ -368,8 +365,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
368 | { | 365 | { |
369 | if (eventQueue.Count >= EventExecutionMaxQueueSize) | 366 | if (eventQueue.Count >= EventExecutionMaxQueueSize) |
370 | { | 367 | { |
371 | m_ScriptEngine.Log.Error(m_ScriptEngine.ScriptEngineName, "ERROR: Event execution queue item count is at " + eventQueue.Count + ". Config variable \"EventExecutionMaxQueueSize\" is set to " + EventExecutionMaxQueueSize + ", so ignoring new event."); | 368 | m_ScriptEngine.Log.Error("[" + m_ScriptEngine.ScriptEngineName + "]: ERROR: Event execution queue item count is at " + eventQueue.Count + ". Config variable \"EventExecutionMaxQueueSize\" is set to " + EventExecutionMaxQueueSize + ", so ignoring new event."); |
372 | m_ScriptEngine.Log.Error(m_ScriptEngine.ScriptEngineName, "Event ignored: localID: " + localID + ", itemID: " + itemID + ", FunctionName: " + FunctionName); | 369 | m_ScriptEngine.Log.Error("[" + m_ScriptEngine.ScriptEngineName + "]: Event ignored: localID: " + localID + ", itemID: " + itemID + ", FunctionName: " + FunctionName); |
373 | return; | 370 | return; |
374 | } | 371 | } |
375 | 372 | ||
@@ -456,6 +453,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
456 | } | 453 | } |
457 | } | 454 | } |
458 | #endregion | 455 | #endregion |
456 | |||
459 | /// <summary> | 457 | /// <summary> |
460 | /// If set to true then threads and stuff should try to make a graceful exit | 458 | /// If set to true then threads and stuff should try to make a graceful exit |
461 | /// </summary> | 459 | /// </summary> |
@@ -465,6 +463,5 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
465 | set { _PleaseShutdown = value; } | 463 | set { _PleaseShutdown = value; } |
466 | } | 464 | } |
467 | private bool _PleaseShutdown = false; | 465 | private bool _PleaseShutdown = false; |
468 | |||
469 | } | 466 | } |
470 | } \ No newline at end of file | 467 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs index ee38306..afa1839 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventQueueThreadClass.cs | |||
@@ -96,7 +96,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
96 | break; | 96 | break; |
97 | default: | 97 | default: |
98 | MyThreadPriority = ThreadPriority.BelowNormal; // Default | 98 | MyThreadPriority = ThreadPriority.BelowNormal; // Default |
99 | eventQueueManager.m_ScriptEngine.Log.Error("ScriptEngineBase", "Unknown priority type \"" + pri + "\" in config file. Defaulting to \"BelowNormal\"."); | 99 | eventQueueManager.m_ScriptEngine.Log.Error("[ScriptEngineBase]: Unknown priority type \"" + pri + "\" in config file. Defaulting to \"BelowNormal\"."); |
100 | break; | 100 | break; |
101 | } | 101 | } |
102 | 102 | ||
@@ -137,7 +137,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
137 | } | 137 | } |
138 | catch (Exception) | 138 | catch (Exception) |
139 | { | 139 | { |
140 | //myScriptEngine.Log.Verbose(ScriptEngineName, "EventQueueManager Exception killing worker thread: " + e.ToString()); | 140 | //myScriptEngine.Log.Info("[" + ScriptEngineName + "]: EventQueueManager Exception killing worker thread: " + e.ToString()); |
141 | } | 141 | } |
142 | } | 142 | } |
143 | } | 143 | } |
@@ -147,7 +147,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
147 | /// </summary> | 147 | /// </summary> |
148 | private void EventQueueThreadLoop() | 148 | private void EventQueueThreadLoop() |
149 | { | 149 | { |
150 | //myScriptEngine.m_logger.Verbose(ScriptEngineName, "EventQueueManager Worker thread spawned"); | 150 | //myScriptEngine.Log.Info("[" + ScriptEngineName + "]: EventQueueManager Worker thread spawned"); |
151 | try | 151 | try |
152 | { | 152 | { |
153 | while (true) | 153 | while (true) |
@@ -196,7 +196,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
196 | else | 196 | else |
197 | { | 197 | { |
198 | // Something in queue, process | 198 | // Something in queue, process |
199 | //myScriptEngine.m_logger.Verbose(ScriptEngineName, "Processing event for localID: " + QIS.localID + ", itemID: " + QIS.itemID + ", FunctionName: " + QIS.FunctionName); | 199 | //myScriptEngine.Log.Info("[" + ScriptEngineName + "]: Processing event for localID: " + QIS.localID + ", itemID: " + QIS.itemID + ", FunctionName: " + QIS.FunctionName); |
200 | 200 | ||
201 | // OBJECT BASED LOCK - TWO THREADS WORKING ON SAME OBJECT IS NOT GOOD | 201 | // OBJECT BASED LOCK - TWO THREADS WORKING ON SAME OBJECT IS NOT GOOD |
202 | lock (eventQueueManager.queueLock) | 202 | lock (eventQueueManager.queueLock) |
@@ -228,12 +228,12 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
228 | try | 228 | try |
229 | { | 229 | { |
230 | #if DEBUG | 230 | #if DEBUG |
231 | eventQueueManager.m_ScriptEngine.Log.Debug(ScriptEngineName, | 231 | eventQueueManager.m_ScriptEngine.Log.Debug("[" + ScriptEngineName + "]: " + |
232 | "Executing event:\r\n" | 232 | "Executing event:\r\n" |
233 | + "QIS.localID: " + QIS.localID | 233 | + "QIS.localID: " + QIS.localID |
234 | + ", QIS.itemID: " + QIS.itemID | 234 | + ", QIS.itemID: " + QIS.itemID |
235 | + ", QIS.functionName: " + | 235 | + ", QIS.functionName: " + |
236 | QIS.functionName); | 236 | QIS.functionName); |
237 | #endif | 237 | #endif |
238 | LastExecutionStarted = DateTime.Now.Ticks; | 238 | LastExecutionStarted = DateTime.Now.Ticks; |
239 | KillCurrentScript = false; | 239 | KillCurrentScript = false; |
@@ -284,9 +284,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
284 | //else | 284 | //else |
285 | //{ | 285 | //{ |
286 | // T oconsole | 286 | // T oconsole |
287 | eventQueueManager.m_ScriptEngine.Log.Error(ScriptEngineName, | 287 | eventQueueManager.m_ScriptEngine.Log.Error("[" + ScriptEngineName + "]: " + |
288 | "Unable to send text in-world:\r\n" + | 288 | "Unable to send text in-world:\r\n" + |
289 | text); | 289 | text); |
290 | } | 290 | } |
291 | finally | 291 | finally |
292 | { | 292 | { |
@@ -309,17 +309,17 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
309 | } | 309 | } |
310 | catch (ThreadAbortException tae) | 310 | catch (ThreadAbortException tae) |
311 | { | 311 | { |
312 | eventQueueManager.m_ScriptEngine.Log.Notice(ScriptEngineName, "ThreadAbortException while executing function."); | 312 | eventQueueManager.m_ScriptEngine.Log.Info("[" + ScriptEngineName + "]: ThreadAbortException while executing function."); |
313 | } | 313 | } |
314 | catch (Exception e) | 314 | catch (Exception e) |
315 | { | 315 | { |
316 | eventQueueManager.m_ScriptEngine.Log.Error(ScriptEngineName, "Exception in EventQueueThreadLoop: " + e.ToString()); | 316 | eventQueueManager.m_ScriptEngine.Log.Error("[" + ScriptEngineName + "]: Exception in EventQueueThreadLoop: " + e.ToString()); |
317 | } | 317 | } |
318 | } // while | 318 | } // while |
319 | } // try | 319 | } // try |
320 | catch (ThreadAbortException) | 320 | catch (ThreadAbortException) |
321 | { | 321 | { |
322 | //myScriptEngine.Log.Verbose(ScriptEngineName, "EventQueueManager Worker thread killed: " + tae.Message); | 322 | //myScriptEngine.Log.Info("[" + ScriptEngineName + "]: EventQueueManager Worker thread killed: " + tae.Message); |
323 | } | 323 | } |
324 | } | 324 | } |
325 | 325 | ||
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs index 4a119f0..ab4ea04 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/MaintenanceThread.cs | |||
@@ -87,7 +87,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
87 | private void StopMaintenanceThread() | 87 | private void StopMaintenanceThread() |
88 | { | 88 | { |
89 | #if DEBUG | 89 | #if DEBUG |
90 | m_ScriptEngine.Log.Debug(m_ScriptEngine.ScriptEngineName, "StopMaintenanceThread() called"); | 90 | m_ScriptEngine.Log.Debug("[" + m_ScriptEngine.ScriptEngineName + "]: StopMaintenanceThread() called"); |
91 | #endif | 91 | #endif |
92 | PleaseShutdown = true; | 92 | PleaseShutdown = true; |
93 | Thread.Sleep(100); | 93 | Thread.Sleep(100); |
@@ -103,7 +103,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
103 | } | 103 | } |
104 | catch (Exception ex) | 104 | catch (Exception ex) |
105 | { | 105 | { |
106 | m_ScriptEngine.Log.Error(m_ScriptEngine.ScriptEngineName, "Exception stopping maintenence thread: " + ex.ToString()); | 106 | m_ScriptEngine.Log.Error("[" + m_ScriptEngine.ScriptEngineName + "]: Exception stopping maintenence thread: " + ex.ToString()); |
107 | } | 107 | } |
108 | } | 108 | } |
109 | 109 | ||
@@ -113,8 +113,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
113 | public void MaintenanceLoop() | 113 | public void MaintenanceLoop() |
114 | { | 114 | { |
115 | if (m_ScriptEngine.m_EventQueueManager.maxFunctionExecutionTimens < MaintenanceLoopms) | 115 | if (m_ScriptEngine.m_EventQueueManager.maxFunctionExecutionTimens < MaintenanceLoopms) |
116 | m_ScriptEngine.Log.Warn(m_ScriptEngine.ScriptEngineName, | 116 | m_ScriptEngine.Log.Warn("[" + m_ScriptEngine.ScriptEngineName + "]: " + |
117 | "Configuration error: MaxEventExecutionTimeMs is less than MaintenanceLoopms. The Maintenance Loop will only check scripts once per run."); | 117 | "Configuration error: MaxEventExecutionTimeMs is less than MaintenanceLoopms. The Maintenance Loop will only check scripts once per run."); |
118 | 118 | ||
119 | long Last_maxFunctionExecutionTimens = 0; // DateTime.Now.Ticks; | 119 | long Last_maxFunctionExecutionTimens = 0; // DateTime.Now.Ticks; |
120 | long Last_ReReadConfigFilens = DateTime.Now.Ticks; | 120 | long Last_ReReadConfigFilens = DateTime.Now.Ticks; |
@@ -170,7 +170,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
170 | } | 170 | } |
171 | catch (Exception ex) | 171 | catch (Exception ex) |
172 | { | 172 | { |
173 | m_ScriptEngine.Log.Error(m_ScriptEngine.ScriptEngineName, "Exception in MaintenanceLoopThread. Thread will recover after 5 sec throttle. Exception: " + ex.ToString()); | 173 | m_ScriptEngine.Log.Error("[" + m_ScriptEngine.ScriptEngineName + "]: Exception in MaintenanceLoopThread. Thread will recover after 5 sec throttle. Exception: " + ex.ToString()); |
174 | Thread.Sleep(5000); | 174 | Thread.Sleep(5000); |
175 | } | 175 | } |
176 | } | 176 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs index f09e631..78d9f7d 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptEngine.cs | |||
@@ -26,7 +26,6 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | 28 | ||
29 | |||
30 | using System; | 29 | using System; |
31 | using System.IO; | 30 | using System.IO; |
32 | using Nini.Config; | 31 | using Nini.Config; |
@@ -45,6 +44,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
45 | [Serializable] | 44 | [Serializable] |
46 | public abstract class ScriptEngine : IRegionModule, OpenSim.Region.ScriptEngine.Common.ScriptServerInterfaces.ScriptEngine, iScriptEngineFunctionModule | 45 | public abstract class ScriptEngine : IRegionModule, OpenSim.Region.ScriptEngine.Common.ScriptServerInterfaces.ScriptEngine, iScriptEngineFunctionModule |
47 | { | 46 | { |
47 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
48 | |||
48 | public Scene World; | 49 | public Scene World; |
49 | public EventManager m_EventManager; // Handles and queues incoming events from OpenSim | 50 | public EventManager m_EventManager; // Handles and queues incoming events from OpenSim |
50 | public EventQueueManager m_EventQueueManager; // Executes events, handles script threads | 51 | public EventQueueManager m_EventQueueManager; // Executes events, handles script threads |
@@ -73,7 +74,10 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
73 | 74 | ||
74 | public abstract ScriptManager _GetScriptManager(); | 75 | public abstract ScriptManager _GetScriptManager(); |
75 | 76 | ||
76 | private LogBase m_log; | 77 | public log4net.ILog Log |
78 | { | ||
79 | get { return m_log; } | ||
80 | } | ||
77 | 81 | ||
78 | public ScriptEngine() | 82 | public ScriptEngine() |
79 | { | 83 | { |
@@ -81,25 +85,18 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
81 | Common.mySE = this; | 85 | Common.mySE = this; |
82 | } | 86 | } |
83 | 87 | ||
84 | public LogBase Log | 88 | public void InitializeEngine(Scene Sceneworld, IConfigSource config, bool HookUpToServer, ScriptManager newScriptManager) |
85 | { | ||
86 | get { return m_log; } | ||
87 | } | ||
88 | |||
89 | public void InitializeEngine(Scene Sceneworld, IConfigSource config, LogBase logger, bool HookUpToServer, ScriptManager newScriptManager) | ||
90 | { | 89 | { |
91 | World = Sceneworld; | 90 | World = Sceneworld; |
92 | m_log = logger; | ||
93 | ConfigSource = config; | 91 | ConfigSource = config; |
94 | Log.Verbose(ScriptEngineName, "ScriptEngine initializing"); | 92 | m_log.Info("[" + ScriptEngineName + "]: ScriptEngine initializing"); |
95 | 93 | ||
96 | // Make sure we have config | 94 | // Make sure we have config |
97 | if (ConfigSource.Configs[ScriptEngineName] == null) | 95 | if (ConfigSource.Configs[ScriptEngineName] == null) |
98 | ConfigSource.AddConfig(ScriptEngineName); | 96 | ConfigSource.AddConfig(ScriptEngineName); |
99 | ScriptConfigSource = ConfigSource.Configs[ScriptEngineName]; | 97 | ScriptConfigSource = ConfigSource.Configs[ScriptEngineName]; |
100 | 98 | ||
101 | 99 | //m_log.Info("[" + ScriptEngineName + "]: InitializeEngine"); | |
102 | //m_logger.Status(ScriptEngineName, "InitializeEngine"); | ||
103 | 100 | ||
104 | // Create all objects we'll be using | 101 | // Create all objects we'll be using |
105 | m_EventQueueManager = new EventQueueManager(this); | 102 | m_EventQueueManager = new EventQueueManager(this); |
@@ -111,11 +108,9 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
111 | m_ASYNCLSLCommandManager = new AsyncLSLCommandManager(this); | 108 | m_ASYNCLSLCommandManager = new AsyncLSLCommandManager(this); |
112 | m_MaintenanceThread = new MaintenanceThread(this); | 109 | m_MaintenanceThread = new MaintenanceThread(this); |
113 | 110 | ||
114 | Log.Verbose(ScriptEngineName, "Reading configuration from config section \"" + ScriptEngineName + "\""); | 111 | m_log.Info("[" + ScriptEngineName + "]: Reading configuration from config section \"" + ScriptEngineName + "\""); |
115 | ReadConfig(); | 112 | ReadConfig(); |
116 | 113 | ||
117 | |||
118 | |||
119 | // Should we iterate the region for scripts that needs starting? | 114 | // Should we iterate the region for scripts that needs starting? |
120 | // Or can we assume we are loaded before anything else so we can use proper events? | 115 | // Or can we assume we are loaded before anything else so we can use proper events? |
121 | } | 116 | } |
@@ -129,10 +124,11 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
129 | { | 124 | { |
130 | return this.m_EventManager; | 125 | return this.m_EventManager; |
131 | } | 126 | } |
127 | |||
132 | public void ReadConfig() | 128 | public void ReadConfig() |
133 | { | 129 | { |
134 | //#if DEBUG | 130 | //#if DEBUG |
135 | // Log.Debug(ScriptEngineName, "Refreshing configuration for all modules"); | 131 | // m_log.Debug("[" + ScriptEngineName + "]: Refreshing configuration for all modules"); |
136 | //#endif | 132 | //#endif |
137 | RefreshConfigFileSeconds = ScriptConfigSource.GetInt("RefreshConfig", 30); | 133 | RefreshConfigFileSeconds = ScriptConfigSource.GetInt("RefreshConfig", 30); |
138 | 134 | ||
@@ -153,10 +149,8 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
153 | if (m_AppDomainManager != null) m_AppDomainManager.ReadConfig(); | 149 | if (m_AppDomainManager != null) m_AppDomainManager.ReadConfig(); |
154 | if (m_ASYNCLSLCommandManager != null) m_ASYNCLSLCommandManager.ReadConfig(); | 150 | if (m_ASYNCLSLCommandManager != null) m_ASYNCLSLCommandManager.ReadConfig(); |
155 | if (m_MaintenanceThread != null) m_MaintenanceThread.ReadConfig(); | 151 | if (m_MaintenanceThread != null) m_MaintenanceThread.ReadConfig(); |
156 | |||
157 | } | 152 | } |
158 | 153 | ||
159 | |||
160 | #region IRegionModule | 154 | #region IRegionModule |
161 | 155 | ||
162 | public abstract void Initialise(Scene scene, IConfigSource config); | 156 | public abstract void Initialise(Scene scene, IConfigSource config); |
@@ -179,8 +173,6 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
179 | get { return false; } | 173 | get { return false; } |
180 | } | 174 | } |
181 | 175 | ||
182 | |||
183 | |||
184 | #endregion | 176 | #endregion |
185 | 177 | ||
186 | /// <summary> | 178 | /// <summary> |
@@ -194,4 +186,4 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
194 | private bool _PleaseShutdown = false; | 186 | private bool _PleaseShutdown = false; |
195 | 187 | ||
196 | } | 188 | } |
197 | } \ No newline at end of file | 189 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs index 6661fcc..12d26fc 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/ScriptManager.cs | |||
@@ -249,7 +249,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
249 | { | 249 | { |
250 | if (LUQueue.Count >= LoadUnloadMaxQueueSize) | 250 | if (LUQueue.Count >= LoadUnloadMaxQueueSize) |
251 | { | 251 | { |
252 | m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, "ERROR: Load/unload queue item count is at " + LUQueue.Count + ". Config variable \"LoadUnloadMaxQueueSize\" is set to " + LoadUnloadMaxQueueSize + ", so ignoring new script."); | 252 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: ERROR: Load/unload queue item count is at " + LUQueue.Count + ". Config variable \"LoadUnloadMaxQueueSize\" is set to " + LoadUnloadMaxQueueSize + ", so ignoring new script."); |
253 | return; | 253 | return; |
254 | } | 254 | } |
255 | 255 | ||
@@ -299,7 +299,7 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
299 | Console.WriteLine("ScriptEngine: Inside ExecuteEvent for event " + FunctionName); | 299 | Console.WriteLine("ScriptEngine: Inside ExecuteEvent for event " + FunctionName); |
300 | #endif | 300 | #endif |
301 | // Execute a function in the script | 301 | // Execute a function in the script |
302 | //m_scriptEngine.Log.Verbose(ScriptEngineName, "Executing Function localID: " + localID + ", itemID: " + itemID + ", FunctionName: " + FunctionName); | 302 | //m_scriptEngine.Log.Info("[" + ScriptEngineName + "]: Executing Function localID: " + localID + ", itemID: " + itemID + ", FunctionName: " + FunctionName); |
303 | //ScriptBaseInterface Script = (ScriptBaseInterface)GetScript(localID, itemID); | 303 | //ScriptBaseInterface Script = (ScriptBaseInterface)GetScript(localID, itemID); |
304 | IScript Script = GetScript(localID, itemID); | 304 | IScript Script = GetScript(localID, itemID); |
305 | if (Script == null) | 305 | if (Script == null) |
@@ -418,4 +418,4 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
418 | private bool _PleaseShutdown = false; | 418 | private bool _PleaseShutdown = false; |
419 | 419 | ||
420 | } | 420 | } |
421 | } \ No newline at end of file | 421 | } |
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs b/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs index 38f7e7b..d5031c8 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptServerInterfaces.cs | |||
@@ -79,12 +79,12 @@ namespace OpenSim.Region.ScriptEngine.Common | |||
79 | { | 79 | { |
80 | RemoteEvents Events(); | 80 | RemoteEvents Events(); |
81 | } | 81 | } |
82 | |||
82 | public interface ScriptEngine | 83 | public interface ScriptEngine |
83 | { | 84 | { |
84 | RemoteEvents EventManager(); | 85 | RemoteEvents EventManager(); |
85 | void InitializeEngine(Scene Sceneworld, IConfigSource config, LogBase logger, bool DontHookUp, ScriptManager newScriptManager); | 86 | void InitializeEngine(Scene Sceneworld, IConfigSource config, bool DontHookUp, ScriptManager newScriptManager); |
86 | ScriptManager GetScriptManager(); | 87 | ScriptManager GetScriptManager(); |
87 | } | 88 | } |
88 | |||
89 | } | 89 | } |
90 | } | 90 | } |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs index 3451cce..2f985e4 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs | |||
@@ -40,7 +40,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
40 | { | 40 | { |
41 | public class Compiler | 41 | public class Compiler |
42 | { | 42 | { |
43 | |||
44 | // * Uses "LSL2Converter" to convert LSL to C# if necessary. | 43 | // * Uses "LSL2Converter" to convert LSL to C# if necessary. |
45 | // * Compiles C#-code into an assembly | 44 | // * Compiles C#-code into an assembly |
46 | // * Returns assembly name ready for AppDomain load. | 45 | // * Returns assembly name ready for AppDomain load. |
@@ -113,7 +112,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
113 | AllowedCompilers.Clear(); | 112 | AllowedCompilers.Clear(); |
114 | 113 | ||
115 | #if DEBUG | 114 | #if DEBUG |
116 | m_scriptEngine.Log.Debug(m_scriptEngine.ScriptEngineName, "Allowed languages: " + allowComp); | 115 | m_scriptEngine.Log.Debug("[" + m_scriptEngine.ScriptEngineName + "]: Allowed languages: " + allowComp); |
117 | #endif | 116 | #endif |
118 | 117 | ||
119 | 118 | ||
@@ -122,18 +121,18 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
122 | string strlan = strl.Trim(" \t".ToCharArray()).ToLower(); | 121 | string strlan = strl.Trim(" \t".ToCharArray()).ToLower(); |
123 | if (!LanguageMapping.ContainsKey(strlan)) | 122 | if (!LanguageMapping.ContainsKey(strlan)) |
124 | { | 123 | { |
125 | m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, "Config error. Compiler is unable to recongnize language type \"" + strlan + "\" specified in \"AllowedCompilers\"."); | 124 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: Config error. Compiler is unable to recongnize language type \"" + strlan + "\" specified in \"AllowedCompilers\"."); |
126 | } | 125 | } |
127 | else | 126 | else |
128 | { | 127 | { |
129 | #if DEBUG | 128 | #if DEBUG |
130 | m_scriptEngine.Log.Debug(m_scriptEngine.ScriptEngineName, "Config OK. Compiler recongnized language type \"" + strlan + "\" specified in \"AllowedCompilers\"."); | 129 | m_scriptEngine.Log.Debug("[" + m_scriptEngine.ScriptEngineName + "]: Config OK. Compiler recongnized language type \"" + strlan + "\" specified in \"AllowedCompilers\"."); |
131 | #endif | 130 | #endif |
132 | } | 131 | } |
133 | AllowedCompilers.Add(strlan, true); | 132 | AllowedCompilers.Add(strlan, true); |
134 | } | 133 | } |
135 | if (AllowedCompilers.Count == 0) | 134 | if (AllowedCompilers.Count == 0) |
136 | m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, "Config error. Compiler could not recognize any language in \"AllowedCompilers\". Scripts will not be executed!"); | 135 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: Config error. Compiler could not recognize any language in \"AllowedCompilers\". Scripts will not be executed!"); |
137 | 136 | ||
138 | // Default language | 137 | // Default language |
139 | string defaultCompileLanguage = m_scriptEngine.ScriptConfigSource.GetString("DefaultCompileLanguage", "lsl").ToLower(); | 138 | string defaultCompileLanguage = m_scriptEngine.ScriptConfigSource.GetString("DefaultCompileLanguage", "lsl").ToLower(); |
@@ -141,22 +140,22 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
141 | // Is this language recognized at all? | 140 | // Is this language recognized at all? |
142 | if (!LanguageMapping.ContainsKey(defaultCompileLanguage)) | 141 | if (!LanguageMapping.ContainsKey(defaultCompileLanguage)) |
143 | { | 142 | { |
144 | m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, | 143 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: " + |
145 | "Config error. Default language \"" + defaultCompileLanguage + "\" specified in \"DefaultCompileLanguage\" is not recognized as a valid language. Changing default to: \"lsl\"."); | 144 | "Config error. Default language \"" + defaultCompileLanguage + "\" specified in \"DefaultCompileLanguage\" is not recognized as a valid language. Changing default to: \"lsl\"."); |
146 | defaultCompileLanguage = "lsl"; | 145 | defaultCompileLanguage = "lsl"; |
147 | } | 146 | } |
148 | 147 | ||
149 | // Is this language in allow-list? | 148 | // Is this language in allow-list? |
150 | if (!AllowedCompilers.ContainsKey(defaultCompileLanguage)) | 149 | if (!AllowedCompilers.ContainsKey(defaultCompileLanguage)) |
151 | { | 150 | { |
152 | m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, | 151 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: " + |
153 | "Config error. Default language \"" + defaultCompileLanguage + "\"specified in \"DefaultCompileLanguage\" is not in list of \"AllowedCompilers\". Scripts may not be executed!"); | 152 | "Config error. Default language \"" + defaultCompileLanguage + "\"specified in \"DefaultCompileLanguage\" is not in list of \"AllowedCompilers\". Scripts may not be executed!"); |
154 | } | 153 | } |
155 | else | 154 | else |
156 | { | 155 | { |
157 | #if DEBUG | 156 | #if DEBUG |
158 | m_scriptEngine.Log.Debug(m_scriptEngine.ScriptEngineName, | 157 | m_scriptEngine.Log.Debug("[" + m_scriptEngine.ScriptEngineName + "]: " + |
159 | "Config OK. Default language \"" + defaultCompileLanguage + "\" specified in \"DefaultCompileLanguage\" is recognized as a valid language."); | 158 | "Config OK. Default language \"" + defaultCompileLanguage + "\" specified in \"DefaultCompileLanguage\" is recognized as a valid language."); |
160 | #endif | 159 | #endif |
161 | // LANGUAGE IS IN ALLOW-LIST | 160 | // LANGUAGE IS IN ALLOW-LIST |
162 | DefaultCompileLanguage = LanguageMapping[defaultCompileLanguage]; | 161 | DefaultCompileLanguage = LanguageMapping[defaultCompileLanguage]; |
@@ -181,13 +180,13 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
181 | } | 180 | } |
182 | catch (Exception ex) | 181 | catch (Exception ex) |
183 | { | 182 | { |
184 | m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, "Exception trying to create ScriptEngine directory \"" + ScriptEnginesPath + "\": " + ex.ToString()); | 183 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: Exception trying to create ScriptEngine directory \"" + ScriptEnginesPath + "\": " + ex.ToString()); |
185 | } | 184 | } |
186 | } | 185 | } |
187 | 186 | ||
188 | foreach (string file in Directory.GetFiles(ScriptEnginesPath)) | 187 | foreach (string file in Directory.GetFiles(ScriptEnginesPath)) |
189 | { | 188 | { |
190 | //m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, "FILE FOUND: " + file); | 189 | //m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: FILE FOUND: " + file); |
191 | 190 | ||
192 | if (file.ToLower().StartsWith(FilePrefix + "_compiled_") || | 191 | if (file.ToLower().StartsWith(FilePrefix + "_compiled_") || |
193 | file.ToLower().StartsWith(FilePrefix + "_source_")) | 192 | file.ToLower().StartsWith(FilePrefix + "_source_")) |
@@ -198,7 +197,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
198 | } | 197 | } |
199 | catch (Exception ex) | 198 | catch (Exception ex) |
200 | { | 199 | { |
201 | m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, "Exception trying delete old script file \"" + file + "\": " + ex.ToString()); | 200 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: Exception trying delete old script file \"" + file + "\": " + ex.ToString()); |
202 | } | 201 | } |
203 | 202 | ||
204 | } | 203 | } |
@@ -313,7 +312,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
313 | Path.Combine("ScriptEngines", | 312 | Path.Combine("ScriptEngines", |
314 | FilePrefix + "_compiled_" + instanceID.ToString() + "_" + scriptCompileCounter.ToString() + ".dll"); | 313 | FilePrefix + "_compiled_" + instanceID.ToString() + "_" + scriptCompileCounter.ToString() + ".dll"); |
315 | #if DEBUG | 314 | #if DEBUG |
316 | m_scriptEngine.Log.Debug(m_scriptEngine.ScriptEngineName, "Starting compile of \"" + OutFile + "\"."); | 315 | m_scriptEngine.Log.Debug("[" + m_scriptEngine.ScriptEngineName + "]: Starting compile of \"" + OutFile + "\"."); |
317 | #endif | 316 | #endif |
318 | try | 317 | try |
319 | { | 318 | { |
@@ -321,7 +320,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
321 | } | 320 | } |
322 | catch (Exception e) | 321 | catch (Exception e) |
323 | { | 322 | { |
324 | //m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, "Unable to delete old existring script-file before writing new. Compile aborted: " + e.ToString()); | 323 | //m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: Unable to delete old existring script-file before writing new. Compile aborted: " + e.ToString()); |
325 | throw new Exception("Unable to delete old existring script-file before writing new. Compile aborted: " + e.ToString()); | 324 | throw new Exception("Unable to delete old existring script-file before writing new. Compile aborted: " + e.ToString()); |
326 | } | 325 | } |
327 | //string OutFile = Path.Combine("ScriptEngines", "SecondLife.Script.dll"); | 326 | //string OutFile = Path.Combine("ScriptEngines", "SecondLife.Script.dll"); |
@@ -338,7 +337,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL | |||
338 | } | 337 | } |
339 | catch (Exception ex) | 338 | catch (Exception ex) |
340 | { | 339 | { |
341 | m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, "Exception while trying to write script source to file \"" + srcFileName + "\": " + ex.ToString()); | 340 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: Exception while trying to write script source to file \"" + srcFileName + "\": " + ex.ToString()); |
342 | } | 341 | } |
343 | } | 342 | } |
344 | 343 | ||
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs index 720f946..514c550 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptEngine.cs | |||
@@ -40,7 +40,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
40 | public override void Initialise(Scene scene, IConfigSource config) | 40 | public override void Initialise(Scene scene, IConfigSource config) |
41 | { | 41 | { |
42 | ConfigSource = config; | 42 | ConfigSource = config; |
43 | InitializeEngine(scene, config, MainLog.Instance, true, GetScriptManager()); | 43 | InitializeEngine(scene, config, true, GetScriptManager()); |
44 | } | 44 | } |
45 | 45 | ||
46 | public override OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.ScriptManager _GetScriptManager() | 46 | public override OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.ScriptManager _GetScriptManager() |
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs index 61da6ef..c39d376 100644 --- a/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/DotNetEngine/ScriptManager.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | /* Original code: Tedd Hansen */ | 28 | /* Original code: Tedd Hansen */ |
29 | |||
29 | using System; | 30 | using System; |
30 | using libsecondlife; | 31 | using libsecondlife; |
31 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
@@ -60,7 +61,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
60 | 61 | ||
61 | public override void _StartScript(uint localID, LLUUID itemID, string Script) | 62 | public override void _StartScript(uint localID, LLUUID itemID, string Script) |
62 | { | 63 | { |
63 | m_scriptEngine.Log.Debug(m_scriptEngine.ScriptEngineName, "ScriptManager StartScript: localID: " + localID + ", itemID: " + itemID); | 64 | m_scriptEngine.Log.Debug("[" + m_scriptEngine.ScriptEngineName + "]: ScriptManager StartScript: localID: " + localID + ", itemID: " + itemID); |
64 | 65 | ||
65 | 66 | ||
66 | //IScriptHost root = host.GetRoot(); | 67 | //IScriptHost root = host.GetRoot(); |
@@ -85,7 +86,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
85 | CompiledScript = m_scriptEngine.m_AppDomainManager.LoadScript(ScriptSource); | 86 | CompiledScript = m_scriptEngine.m_AppDomainManager.LoadScript(ScriptSource); |
86 | 87 | ||
87 | #if DEBUG | 88 | #if DEBUG |
88 | m_scriptEngine.Log.Debug(m_scriptEngine.ScriptEngineName, "Script " + itemID + " occupies {0} bytes", GC.GetTotalMemory(true) - before); | 89 | m_scriptEngine.Log.Debug(String.Format("[" + m_scriptEngine.ScriptEngineName + "]: Script " + itemID + " occupies {0} bytes", GC.GetTotalMemory(true) - before)); |
89 | #endif | 90 | #endif |
90 | 91 | ||
91 | CompiledScript.Source = Script; | 92 | CompiledScript.Source = Script; |
@@ -106,7 +107,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
106 | } | 107 | } |
107 | catch (Exception e) | 108 | catch (Exception e) |
108 | { | 109 | { |
109 | //m_scriptEngine.Log.Error("ScriptEngine", "Error compiling script: " + e.ToString()); | 110 | //m_scriptEngine.Log.Error("[ScriptEngine]: Error compiling script: " + e.ToString()); |
110 | try | 111 | try |
111 | { | 112 | { |
112 | // DISPLAY ERROR INWORLD | 113 | // DISPLAY ERROR INWORLD |
@@ -118,9 +119,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
118 | } | 119 | } |
119 | catch (Exception e2) | 120 | catch (Exception e2) |
120 | { | 121 | { |
121 | m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, "Error displaying error in-world: " + e2.ToString()); | 122 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: Error displaying error in-world: " + e2.ToString()); |
122 | m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, | 123 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: " + |
123 | "Errormessage: Error compiling script:\r\n" + e.Message.ToString()); | 124 | "Errormessage: Error compiling script:\r\n" + e.Message.ToString()); |
124 | } | 125 | } |
125 | } | 126 | } |
126 | } | 127 | } |
@@ -129,7 +130,7 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
129 | { | 130 | { |
130 | // Stop script | 131 | // Stop script |
131 | #if DEBUG | 132 | #if DEBUG |
132 | m_scriptEngine.Log.Debug(m_scriptEngine.ScriptEngineName, "Stop script localID: " + localID + " LLUID: " + itemID.ToString()); | 133 | m_scriptEngine.Log.Debug("[" + m_scriptEngine.ScriptEngineName + "]: Stop script localID: " + localID + " LLUID: " + itemID.ToString()); |
133 | #endif | 134 | #endif |
134 | 135 | ||
135 | // Stop long command on script | 136 | // Stop long command on script |
@@ -142,7 +143,6 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
142 | // TEMP: First serialize it | 143 | // TEMP: First serialize it |
143 | //GetSerializedScript(localID, itemID); | 144 | //GetSerializedScript(localID, itemID); |
144 | 145 | ||
145 | |||
146 | try | 146 | try |
147 | { | 147 | { |
148 | // Get AppDomain | 148 | // Get AppDomain |
@@ -156,10 +156,9 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine | |||
156 | } | 156 | } |
157 | catch (Exception e) | 157 | catch (Exception e) |
158 | { | 158 | { |
159 | m_scriptEngine.Log.Error(m_scriptEngine.ScriptEngineName, "Exception stopping script localID: " + localID + " LLUID: " + itemID.ToString() + | 159 | m_scriptEngine.Log.Error("[" + m_scriptEngine.ScriptEngineName + "]: Exception stopping script localID: " + localID + " LLUID: " + itemID.ToString() + |
160 | ": " + e.ToString()); | 160 | ": " + e.ToString()); |
161 | } | 161 | } |
162 | } | 162 | } |
163 | |||
164 | } | 163 | } |
165 | } \ No newline at end of file | 164 | } |
diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/LSOEngine/ScriptEngine.cs index 45dfd9e..2a846a9 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/ScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/ScriptEngine.cs | |||
@@ -44,7 +44,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine | |||
44 | // We need to override a few things for our DotNetEngine | 44 | // We need to override a few things for our DotNetEngine |
45 | public override void Initialise(Scene scene, IConfigSource config) | 45 | public override void Initialise(Scene scene, IConfigSource config) |
46 | { | 46 | { |
47 | InitializeEngine(scene, config, MainLog.Instance, true, GetScriptManager()); | 47 | InitializeEngine(scene, config, true, GetScriptManager()); |
48 | } | 48 | } |
49 | 49 | ||
50 | public override OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.ScriptManager _GetScriptManager() | 50 | public override OpenSim.Region.ScriptEngine.Common.ScriptEngineBase.ScriptManager _GetScriptManager() |
diff --git a/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs b/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs index 652c24c..db81487 100644 --- a/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs +++ b/OpenSim/Region/ScriptEngine/LSOEngine/ScriptManager.cs | |||
@@ -101,7 +101,7 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine | |||
101 | } | 101 | } |
102 | catch (Exception e) | 102 | catch (Exception e) |
103 | { | 103 | { |
104 | //m_scriptEngine.Log.Error("ScriptEngine", "Error compiling script: " + e.ToString()); | 104 | //m_scriptEngine.Log.Error("[ScriptEngine]: Error compiling script: " + e.ToString()); |
105 | try | 105 | try |
106 | { | 106 | { |
107 | // DISPLAY ERROR INWORLD | 107 | // DISPLAY ERROR INWORLD |
@@ -113,9 +113,9 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine | |||
113 | } | 113 | } |
114 | catch (Exception e2) | 114 | catch (Exception e2) |
115 | { | 115 | { |
116 | m_scriptEngine.Log.Error("ScriptEngine", "Error displaying error in-world: " + e2.ToString()); | 116 | m_scriptEngine.Log.Error("[ScriptEngine]: Error displaying error in-world: " + e2.ToString()); |
117 | m_scriptEngine.Log.Error("ScriptEngine", | 117 | m_scriptEngine.Log.Error("[ScriptEngine]: " + |
118 | "Errormessage: Error compiling script:\r\n" + e.Message.ToString()); | 118 | "Errormessage: Error compiling script:\r\n" + e.Message.ToString()); |
119 | } | 119 | } |
120 | } | 120 | } |
121 | } | 121 | } |
@@ -125,7 +125,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine | |||
125 | // Stop script | 125 | // Stop script |
126 | Console.WriteLine("Stop script localID: " + localID + " LLUID: " + itemID.ToString()); | 126 | Console.WriteLine("Stop script localID: " + localID + " LLUID: " + itemID.ToString()); |
127 | 127 | ||
128 | |||
129 | // Stop long command on script | 128 | // Stop long command on script |
130 | m_scriptEngine.m_ASYNCLSLCommandManager.RemoveScript(localID, itemID); | 129 | m_scriptEngine.m_ASYNCLSLCommandManager.RemoveScript(localID, itemID); |
131 | 130 | ||
@@ -136,7 +135,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine | |||
136 | // TEMP: First serialize it | 135 | // TEMP: First serialize it |
137 | //GetSerializedScript(localID, itemID); | 136 | //GetSerializedScript(localID, itemID); |
138 | 137 | ||
139 | |||
140 | try | 138 | try |
141 | { | 139 | { |
142 | // Get AppDomain | 140 | // Get AppDomain |
@@ -157,7 +155,6 @@ namespace OpenSim.Region.ScriptEngine.LSOEngine | |||
157 | 155 | ||
158 | public override void Initialize() | 156 | public override void Initialize() |
159 | { | 157 | { |
160 | |||
161 | } | 158 | } |
162 | } | 159 | } |
163 | } \ No newline at end of file | 160 | } |
diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/Common.cs b/OpenSim/Region/ScriptEngine/RemoteServer/Common.cs index bac32cb..e65b8ff 100644 --- a/OpenSim/Region/ScriptEngine/RemoteServer/Common.cs +++ b/OpenSim/Region/ScriptEngine/RemoteServer/Common.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | /* Original code: Tedd Hansen */ | 28 | /* Original code: Tedd Hansen */ |
29 | |||
29 | namespace OpenSim.Region.ScriptEngine.RemoteServer | 30 | namespace OpenSim.Region.ScriptEngine.RemoteServer |
30 | { | 31 | { |
31 | public static class Common | 32 | public static class Common |
@@ -43,15 +44,15 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer | |||
43 | public static void SendToDebug(string Message) | 44 | public static void SendToDebug(string Message) |
44 | { | 45 | { |
45 | //if (Debug == true) | 46 | //if (Debug == true) |
46 | mySE.Log.Verbose("ScriptEngine", "Debug: " + Message); | 47 | mySE.Log.Info("[ScriptEngine]: Debug: " + Message); |
47 | //SendToDebugEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message); | 48 | //SendToDebugEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message); |
48 | } | 49 | } |
49 | 50 | ||
50 | public static void SendToLog(string Message) | 51 | public static void SendToLog(string Message) |
51 | { | 52 | { |
52 | //if (Debug == true) | 53 | //if (Debug == true) |
53 | mySE.Log.Verbose("ScriptEngine", "LOG: " + Message); | 54 | mySE.Log.Info("[ScriptEngine]: LOG: " + Message); |
54 | //SendToLogEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message); | 55 | //SendToLogEvent("\r\n" + DateTime.Now.ToString("[HH:mm:ss] ") + Message); |
55 | } | 56 | } |
56 | } | 57 | } |
57 | } \ No newline at end of file | 58 | } |
diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs b/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs index 047ff2e..971982c 100644 --- a/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/RemoteServer/EventManager.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | /* Original code: Tedd Hansen */ | 28 | /* Original code: Tedd Hansen */ |
29 | |||
29 | using System; | 30 | using System; |
30 | using libsecondlife; | 31 | using libsecondlife; |
31 | using OpenSim.Framework; | 32 | using OpenSim.Framework; |
@@ -40,7 +41,6 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer | |||
40 | [Serializable] | 41 | [Serializable] |
41 | internal class EventManager | 42 | internal class EventManager |
42 | { | 43 | { |
43 | |||
44 | System.Collections.Generic.Dictionary<uint, ScriptServerInterfaces.ServerRemotingObject> remoteScript = new System.Collections.Generic.Dictionary<uint, ScriptServerInterfaces.ServerRemotingObject>(); | 44 | System.Collections.Generic.Dictionary<uint, ScriptServerInterfaces.ServerRemotingObject> remoteScript = new System.Collections.Generic.Dictionary<uint, ScriptServerInterfaces.ServerRemotingObject>(); |
45 | TCPClient m_TCPClient; | 45 | TCPClient m_TCPClient; |
46 | TRPC_Remote RPC; | 46 | TRPC_Remote RPC; |
@@ -59,32 +59,28 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer | |||
59 | RPC.ReceiveCommand += new TRPC_Remote.ReceiveCommandDelegate(RPC_ReceiveCommand); | 59 | RPC.ReceiveCommand += new TRPC_Remote.ReceiveCommandDelegate(RPC_ReceiveCommand); |
60 | myScriptServerID = m_TCPClient.ConnectAndReturnID(remoteHost, remotePort); | 60 | myScriptServerID = m_TCPClient.ConnectAndReturnID(remoteHost, remotePort); |
61 | 61 | ||
62 | myScriptEngine.Log.Verbose("RemoteEngine", "Hooking up to server events"); | 62 | myScriptEngine.Log.Info("[RemoteEngine]: Hooking up to server events"); |
63 | //myScriptEngine.World.EventManager.OnObjectGrab += touch_start; | 63 | //myScriptEngine.World.EventManager.OnObjectGrab += touch_start; |
64 | myScriptEngine.World.EventManager.OnRezScript += OnRezScript; | 64 | myScriptEngine.World.EventManager.OnRezScript += OnRezScript; |
65 | //myScriptEngine.World.EventManager.OnRemoveScript += OnRemoveScript; | 65 | //myScriptEngine.World.EventManager.OnRemoveScript += OnRemoveScript; |
66 | |||
67 | |||
68 | } | 66 | } |
69 | 67 | ||
70 | void RPC_ReceiveCommand(int ID, string Command, params object[] p) | 68 | void RPC_ReceiveCommand(int ID, string Command, params object[] p) |
71 | { | 69 | { |
72 | myScriptEngine.Log.Notice("REMOTESERVER", "Received command: '" + Command + "'"); | 70 | myScriptEngine.Log.Info("[REMOTESERVER]: Received command: '" + Command + "'"); |
73 | if (p != null) | 71 | if (p != null) |
74 | { | 72 | { |
75 | for (int i = 0; i < p.Length; i++) | 73 | for (int i = 0; i < p.Length; i++) |
76 | { | 74 | { |
77 | myScriptEngine.Log.Notice("REMOTESERVER", "Param " + i + ": " + p[i].ToString()); | 75 | myScriptEngine.Log.Info("[REMOTESERVER]: Param " + i + ": " + p[i].ToString()); |
78 | } | 76 | } |
79 | } | 77 | } |
80 | |||
81 | } | 78 | } |
82 | 79 | ||
83 | |||
84 | public void OnRezScript(uint localID, LLUUID itemID, string script) | 80 | public void OnRezScript(uint localID, LLUUID itemID, string script) |
85 | { | 81 | { |
86 | // WE ARE CREATING A NEW SCRIPT ... CREATE SCRIPT, GET A REMOTEID THAT WE MAP FROM LOCALID | 82 | // WE ARE CREATING A NEW SCRIPT ... CREATE SCRIPT, GET A REMOTEID THAT WE MAP FROM LOCALID |
87 | myScriptEngine.Log.Verbose("RemoteEngine", "Creating new script (with connection)"); | 83 | myScriptEngine.Log.Info("[RemoteEngine]: Creating new script (with connection)"); |
88 | 84 | ||
89 | // Temp for now: We have one connection only - this is hardcoded in myScriptServerID | 85 | // Temp for now: We have one connection only - this is hardcoded in myScriptServerID |
90 | RPC.SendCommand(myScriptServerID, "OnRezScript", localID, itemID.ToString(), script); | 86 | RPC.SendCommand(myScriptServerID, "OnRezScript", localID, itemID.ToString(), script); |
@@ -92,18 +88,15 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer | |||
92 | //ScriptServerInterfaces.ServerRemotingObject obj = myScriptEngine.m_RemoteServer.Connect("localhost", 1234); | 88 | //ScriptServerInterfaces.ServerRemotingObject obj = myScriptEngine.m_RemoteServer.Connect("localhost", 1234); |
93 | //remoteScript.Add(localID, obj); | 89 | //remoteScript.Add(localID, obj); |
94 | //remoteScript[localID].Events().OnRezScript(localID, itemID, script); | 90 | //remoteScript[localID].Events().OnRezScript(localID, itemID, script); |
95 | |||
96 | |||
97 | } | 91 | } |
98 | 92 | ||
99 | public void touch_start(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) | 93 | public void touch_start(uint localID, LLVector3 offsetPos, IClientAPI remoteClient) |
100 | { | 94 | { |
101 | //remoteScript[localID].Events.touch_start(localID, offsetPos, remoteClient); | 95 | //remoteScript[localID].Events.touch_start(localID, offsetPos, remoteClient); |
102 | RPC.SendCommand(myScriptServerID, "touch_start", offsetPos, "How to transfer IClientAPI?"); | 96 | RPC.SendCommand(myScriptServerID, "touch_start", offsetPos, "How to transfer IClientAPI?"); |
103 | } | 97 | } |
104 | 98 | ||
105 | 99 | ||
106 | |||
107 | // PLACEHOLDERS -- CODE WILL CHANGE! | 100 | // PLACEHOLDERS -- CODE WILL CHANGE! |
108 | 101 | ||
109 | 102 | ||
@@ -266,6 +259,5 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer | |||
266 | //{ | 259 | //{ |
267 | // remoteScript[localID].Events.http_response(localID, itemID); | 260 | // remoteScript[localID].Events.http_response(localID, itemID); |
268 | //} | 261 | //} |
269 | |||
270 | } | 262 | } |
271 | } \ No newline at end of file | 263 | } |
diff --git a/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs b/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs index d0dc7ab..8d27251 100644 --- a/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs +++ b/OpenSim/Region/ScriptEngine/RemoteServer/ScriptEngine.cs | |||
@@ -26,6 +26,7 @@ | |||
26 | * | 26 | * |
27 | */ | 27 | */ |
28 | /* Original code: Tedd Hansen */ | 28 | /* Original code: Tedd Hansen */ |
29 | |||
29 | using System; | 30 | using System; |
30 | using Nini.Config; | 31 | using Nini.Config; |
31 | using OpenSim.Framework.Console; | 32 | using OpenSim.Framework.Console; |
@@ -41,28 +42,27 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer | |||
41 | [Serializable] | 42 | [Serializable] |
42 | public class ScriptEngine : IRegionModule | 43 | public class ScriptEngine : IRegionModule |
43 | { | 44 | { |
45 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
46 | |||
44 | internal Scene World; | 47 | internal Scene World; |
45 | internal EventManager m_EventManager; // Handles and queues incoming events from OpenSim | 48 | internal EventManager m_EventManager; // Handles and queues incoming events from OpenSim |
46 | internal RemoteServer m_RemoteServer; // Handles connections to remote servers | 49 | internal RemoteServer m_RemoteServer; // Handles connections to remote servers |
47 | 50 | ||
48 | private LogBase m_log; | ||
49 | |||
50 | public ScriptEngine() | 51 | public ScriptEngine() |
51 | { | 52 | { |
52 | Common.mySE = this; | 53 | Common.mySE = this; |
53 | } | 54 | } |
54 | 55 | ||
55 | public LogBase Log | 56 | public log4net.ILog Log |
56 | { | 57 | { |
57 | get { return m_log; } | 58 | get { return m_log; } |
58 | } | 59 | } |
59 | 60 | ||
60 | public void InitializeEngine(Scene Sceneworld, LogBase logger) | 61 | public void InitializeEngine(Scene Sceneworld) |
61 | { | 62 | { |
62 | World = Sceneworld; | 63 | World = Sceneworld; |
63 | m_log = logger; | ||
64 | 64 | ||
65 | Log.Verbose("ScriptEngine", "RemoteEngine (Remote Script Server) initializing"); | 65 | m_log.Info("[ScriptEngine]: RemoteEngine (Remote Script Server) initializing"); |
66 | // Create all objects we'll be using | 66 | // Create all objects we'll be using |
67 | m_EventManager = new EventManager(this); | 67 | m_EventManager = new EventManager(this); |
68 | m_RemoteServer = new RemoteServer(); | 68 | m_RemoteServer = new RemoteServer(); |
@@ -74,12 +74,11 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer | |||
74 | // We are shutting down | 74 | // We are shutting down |
75 | } | 75 | } |
76 | 76 | ||
77 | |||
78 | #region IRegionModule | 77 | #region IRegionModule |
79 | 78 | ||
80 | public void Initialise(Scene scene, IConfigSource config) | 79 | public void Initialise(Scene scene, IConfigSource config) |
81 | { | 80 | { |
82 | InitializeEngine(scene, MainLog.Instance); | 81 | InitializeEngine(scene); |
83 | } | 82 | } |
84 | 83 | ||
85 | public void PostInitialise() | 84 | public void PostInitialise() |
@@ -101,6 +100,5 @@ namespace OpenSim.Region.ScriptEngine.RemoteServer | |||
101 | } | 100 | } |
102 | 101 | ||
103 | #endregion | 102 | #endregion |
104 | |||
105 | } | 103 | } |
106 | } \ No newline at end of file | 104 | } |
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/DB4oDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/DB4oDataStore.cs index 5125709..992f931 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/DB4oDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.DB4o/DB4oDataStore.cs | |||
@@ -42,9 +42,10 @@ using Db4objects.Db4o.Query; | |||
42 | 42 | ||
43 | namespace OpenSim.DataStore.DB4oStorage | 43 | namespace OpenSim.DataStore.DB4oStorage |
44 | { | 44 | { |
45 | |||
46 | public class SceneObjectQuery : Predicate | 45 | public class SceneObjectQuery : Predicate |
47 | { | 46 | { |
47 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
48 | |||
48 | private LLUUID globalIDSearch; | 49 | private LLUUID globalIDSearch; |
49 | 50 | ||
50 | public SceneObjectQuery(LLUUID find) | 51 | public SceneObjectQuery(LLUUID find) |
@@ -58,17 +59,14 @@ namespace OpenSim.DataStore.DB4oStorage | |||
58 | } | 59 | } |
59 | } | 60 | } |
60 | 61 | ||
61 | |||
62 | public class DB4oDataStore : IRegionDataStore | 62 | public class DB4oDataStore : IRegionDataStore |
63 | { | 63 | { |
64 | private IObjectContainer db; | 64 | private IObjectContainer db; |
65 | 65 | ||
66 | public void Initialise(string dbfile, string dbname) | 66 | public void Initialise(string dbfile, string dbname) |
67 | { | 67 | { |
68 | MainLog.Instance.Verbose("DATASTORE", "DB4O - Opening " + dbfile); | 68 | m_log.Info("[DATASTORE]: DB4O - Opening " + dbfile); |
69 | db = Db4oFactory.OpenFile(dbfile); | 69 | db = Db4oFactory.OpenFile(dbfile); |
70 | |||
71 | return; | ||
72 | } | 70 | } |
73 | 71 | ||
74 | public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) | 72 | public void StoreObject(SceneObjectGroup obj, LLUUID regionUUID) |
@@ -91,7 +89,7 @@ namespace OpenSim.DataStore.DB4oStorage | |||
91 | IObjectSet result = db.Get(typeof(SceneObjectGroup)); | 89 | IObjectSet result = db.Get(typeof(SceneObjectGroup)); |
92 | List<SceneObjectGroup> retvals = new List<SceneObjectGroup>(); | 90 | List<SceneObjectGroup> retvals = new List<SceneObjectGroup>(); |
93 | 91 | ||
94 | MainLog.Instance.Verbose("DATASTORE", "DB4O - LoadObjects found " + result.Count.ToString() + " objects"); | 92 | m_log.Info("[DATASTORE]: DB4O - LoadObjects found " + result.Count.ToString() + " objects"); |
95 | 93 | ||
96 | foreach (Object obj in result) | 94 | foreach (Object obj in result) |
97 | { | 95 | { |
@@ -103,7 +101,6 @@ namespace OpenSim.DataStore.DB4oStorage | |||
103 | 101 | ||
104 | public void StoreTerrain(double[,] ter) | 102 | public void StoreTerrain(double[,] ter) |
105 | { | 103 | { |
106 | |||
107 | } | 104 | } |
108 | 105 | ||
109 | public double[,] LoadTerrain() | 106 | public double[,] LoadTerrain() |
@@ -113,12 +110,10 @@ namespace OpenSim.DataStore.DB4oStorage | |||
113 | 110 | ||
114 | public void RemoveLandObject(uint id) | 111 | public void RemoveLandObject(uint id) |
115 | { | 112 | { |
116 | |||
117 | } | 113 | } |
118 | 114 | ||
119 | public void StoreParcel(Land parcel) | 115 | public void StoreParcel(Land parcel) |
120 | { | 116 | { |
121 | |||
122 | } | 117 | } |
123 | 118 | ||
124 | public List<Land> LoadLandObjects() | 119 | public List<Land> LoadLandObjects() |
diff --git a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs index 28df4e7..6a79c8a 100644 --- a/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs +++ b/OpenSim/Region/Storage/OpenSim.DataStore.MSSQL/MSSQLDataStore.cs | |||
@@ -43,6 +43,8 @@ namespace OpenSim.DataStore.MSSQL | |||
43 | { | 43 | { |
44 | public class MSSQLDataStore : IRegionDataStore | 44 | public class MSSQLDataStore : IRegionDataStore |
45 | { | 45 | { |
46 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | ||
47 | |||
46 | private const string primSelect = "select * from prims"; | 48 | private const string primSelect = "select * from prims"; |
47 | private const string shapeSelect = "select * from primshapes"; | 49 | private const string shapeSelect = "select * from primshapes"; |
48 | private const string terrainSelect = "select * from terrain"; | 50 | private const string terrainSelect = "select * from terrain"; |
@@ -68,7 +70,7 @@ namespace OpenSim.DataStore.MSSQL | |||
68 | 70 | ||
69 | ds = new DataSet(); | 71 | ds = new DataSet(); |
70 | 72 | ||
71 | MainLog.Instance.Verbose("DATASTORE", "MSSQL - connecting: " + settingInitialCatalog); | 73 | m_log.Info("[DATASTORE]: MSSQL - connecting: " + settingInitialCatalog); |
72 | SqlConnection conn = new SqlConnection(connectionString); | 74 | SqlConnection conn = new SqlConnection(connectionString); |
73 | SqlCommand primSelectCmd = new SqlCommand(primSelect, conn); | 75 | SqlCommand primSelectCmd = new SqlCommand(primSelect, conn); |
74 | primDa = new SqlDataAdapter(primSelectCmd); | 76 | primDa = new SqlDataAdapter(primSelectCmd); |
@@ -109,7 +111,7 @@ namespace OpenSim.DataStore.MSSQL | |||
109 | } | 111 | } |
110 | catch (Exception) | 112 | catch (Exception) |
111 | { | 113 | { |
112 | MainLog.Instance.Verbose("DATASTORE", "Caught fill error on primshapes table"); | 114 | m_log.Info("[DATASTORE]: Caught fill error on primshapes table"); |
113 | } | 115 | } |
114 | try | 116 | try |
115 | { | 117 | { |
@@ -117,7 +119,7 @@ namespace OpenSim.DataStore.MSSQL | |||
117 | } | 119 | } |
118 | catch (Exception) | 120 | catch (Exception) |
119 | { | 121 | { |
120 | MainLog.Instance.Verbose("DATASTORE", "Caught fill error on terrain table"); | 122 | m_log.Info("[DATASTORE]: Caught fill error on terrain table"); |
121 | } | 123 | } |
122 | return; | 124 | return; |
123 | } | 125 | } |
@@ -129,18 +131,18 @@ namespace OpenSim.DataStore.MSSQL | |||
129 | { | 131 | { |
130 | foreach (SceneObjectPart prim in obj.Children.Values) | 132 | foreach (SceneObjectPart prim in obj.Children.Values) |
131 | { | 133 | { |
132 | MainLog.Instance.Verbose("DATASTORE", "Adding obj: " + obj.UUID + " to region: " + regionUUID); | 134 | m_log.Info("[DATASTORE]: Adding obj: " + obj.UUID + " to region: " + regionUUID); |
133 | addPrim(prim, obj.UUID, regionUUID); | 135 | addPrim(prim, obj.UUID, regionUUID); |
134 | } | 136 | } |
135 | } | 137 | } |
136 | 138 | ||
137 | Commit(); | 139 | Commit(); |
138 | // MainLog.Instance.Verbose("Dump of prims:", ds.GetXml()); | 140 | // m_log.Info("Dump of prims:", ds.GetXml()); |
139 | } | 141 | } |
140 | 142 | ||
141 | public void RemoveObject(LLUUID obj, LLUUID regionUUID) | 143 | public void RemoveObject(LLUUID obj, LLUUID regionUUID) |
142 | { | 144 | { |
143 | MainLog.Instance.Verbose("DATASTORE", "Removing obj: {0} from region: {1}", obj.UUID, regionUUID); | 145 | m_log.Info(String.Format("[DATASTORE]: Removing obj: {0} from region: {1}", obj.UUID, regionUUID)); |
144 | 146 | ||
145 | DataTable prims = ds.Tables["prims"]; | 147 | DataTable prims = ds.Tables["prims"]; |
146 | DataTable shapes = ds.Tables["primshapes"]; | 148 | DataTable shapes = ds.Tables["primshapes"]; |
@@ -179,7 +181,7 @@ namespace OpenSim.DataStore.MSSQL | |||
179 | lock (ds) | 181 | lock (ds) |
180 | { | 182 | { |
181 | DataRow[] primsForRegion = prims.Select(byRegion, orderByParent); | 183 | DataRow[] primsForRegion = prims.Select(byRegion, orderByParent); |
182 | MainLog.Instance.Verbose("DATASTORE", | 184 | m_log.Info("[DATASTORE]: " + |
183 | "Loaded " + primsForRegion.Length + " prims for region: " + regionUUID); | 185 | "Loaded " + primsForRegion.Length + " prims for region: " + regionUUID); |
184 | 186 | ||
185 | foreach (DataRow primRow in primsForRegion) | 187 | foreach (DataRow primRow in primsForRegion) |
@@ -199,7 +201,7 @@ namespace OpenSim.DataStore.MSSQL | |||
199 | } | 201 | } |
200 | else | 202 | else |
201 | { | 203 | { |
202 | MainLog.Instance.Notice( | 204 | m_log.Info( |
203 | "No shape found for prim in storage, so setting default box shape"); | 205 | "No shape found for prim in storage, so setting default box shape"); |
204 | prim.Shape = PrimitiveBaseShape.Default; | 206 | prim.Shape = PrimitiveBaseShape.Default; |
205 | } | 207 | } |
@@ -219,7 +221,7 @@ namespace OpenSim.DataStore.MSSQL | |||
219 | } | 221 | } |
220 | else | 222 | else |
221 | { | 223 | { |
222 | MainLog.Instance.Notice( | 224 | m_log.Info( |
223 | "No shape found for prim in storage, so setting default box shape"); | 225 | "No shape found for prim in storage, so setting default box shape"); |
224 | prim.Shape = PrimitiveBaseShape.Default; | 226 | prim.Shape = PrimitiveBaseShape.Default; |
225 | } | 227 | } |
@@ -228,11 +230,11 @@ namespace OpenSim.DataStore.MSSQL | |||
228 | } | 230 | } |
229 | catch (Exception e) | 231 | catch (Exception e) |
230 | { | 232 | { |
231 | MainLog.Instance.Error("DATASTORE", "Failed create prim object, exception and data follows"); | 233 | m_log.Error("[DATASTORE]: Failed create prim object, exception and data follows"); |
232 | MainLog.Instance.Verbose("DATASTORE", e.ToString()); | 234 | m_log.Info("[DATASTORE]: " + e.ToString()); |
233 | foreach (DataColumn col in prims.Columns) | 235 | foreach (DataColumn col in prims.Columns) |
234 | { | 236 | { |
235 | MainLog.Instance.Verbose("DATASTORE", "Col: " + col.ColumnName + " => " + primRow[col]); | 237 | m_log.Info("[DATASTORE]: Col: " + col.ColumnName + " => " + primRow[col]); |
236 | } | 238 | } |
237 | } | 239 | } |
238 | } | 240 | } |
@@ -245,7 +247,7 @@ namespace OpenSim.DataStore.MSSQL | |||
245 | { | 247 | { |
246 | int revision = Util.UnixTimeSinceEpoch(); | 248 | int revision = Util.UnixTimeSinceEpoch(); |
247 | 249 | ||
248 | MainLog.Instance.Verbose("DATASTORE", "Storing terrain revision r" + revision.ToString()); | 250 | m_log.Info("[DATASTORE]: Storing terrain revision r" + revision.ToString()); |
249 | 251 | ||
250 | DataTable terrain = ds.Tables["terrain"]; | 252 | DataTable terrain = ds.Tables["terrain"]; |
251 | lock (ds) | 253 | lock (ds) |
@@ -288,12 +290,12 @@ namespace OpenSim.DataStore.MSSQL | |||
288 | } | 290 | } |
289 | else | 291 | else |
290 | { | 292 | { |
291 | MainLog.Instance.Verbose("DATASTORE", "No terrain found for region"); | 293 | m_log.Info("[DATASTORE]: No terrain found for region"); |
292 | return null; | 294 | return null; |
293 | } | 295 | } |
294 | 296 | ||
295 | 297 | ||
296 | MainLog.Instance.Verbose("DATASTORE", "Loaded terrain revision r" + rev.ToString()); | 298 | m_log.Info("[DATASTORE]: Loaded terrain revision r" + rev.ToString()); |
297 | } | 299 | } |
298 | 300 | ||
299 | return terret; | 301 | return terret; |
@@ -950,7 +952,7 @@ namespace OpenSim.DataStore.MSSQL | |||
950 | } | 952 | } |
951 | catch (SqlException) | 953 | catch (SqlException) |
952 | { | 954 | { |
953 | MainLog.Instance.Warn("MSSQL", "Primitives Table Already Exists"); | 955 | m_log.Warn("[MSSQL]: Primitives Table Already Exists"); |
954 | } | 956 | } |
955 | 957 | ||
956 | try | 958 | try |
@@ -960,7 +962,7 @@ namespace OpenSim.DataStore.MSSQL | |||
960 | } | 962 | } |
961 | catch (SqlException) | 963 | catch (SqlException) |
962 | { | 964 | { |
963 | MainLog.Instance.Warn("MSSQL", "Shapes Table Already Exists"); | 965 | m_log.Warn("[MSSQL]: Shapes Table Already Exists"); |
964 | } | 966 | } |
965 | 967 | ||
966 | try | 968 | try |
@@ -970,7 +972,7 @@ namespace OpenSim.DataStore.MSSQL | |||
970 | } | 972 | } |
971 | catch (SqlException) | 973 | catch (SqlException) |
972 | { | 974 | { |
973 | MainLog.Instance.Warn("MSSQL", "Terrain Table Already Exists"); | 975 | m_log.Warn("[MSSQL]: Terrain Table Already Exists"); |
974 | } | 976 | } |
975 | 977 | ||
976 | conn.Close(); | 978 | conn.Close(); |
@@ -994,7 +996,7 @@ namespace OpenSim.DataStore.MSSQL | |||
994 | } | 996 | } |
995 | catch (SqlException) | 997 | catch (SqlException) |
996 | { | 998 | { |
997 | MainLog.Instance.Verbose("DATASTORE", "MSSQL Database doesn't exist... creating"); | 999 | m_log.Info("[DATASTORE]: MSSQL Database doesn't exist... creating"); |
998 | InitDB(conn); | 1000 | InitDB(conn); |
999 | } | 1001 | } |
1000 | 1002 | ||
@@ -1009,14 +1011,14 @@ namespace OpenSim.DataStore.MSSQL | |||
1009 | } | 1011 | } |
1010 | catch (SqlException e) | 1012 | catch (SqlException e) |
1011 | { | 1013 | { |
1012 | MainLog.Instance.Verbose("DATASTORE", e.ToString()); | 1014 | m_log.Info("[DATASTORE]: " + e.ToString()); |
1013 | } | 1015 | } |
1014 | 1016 | ||
1015 | foreach (DataColumn col in createPrimTable().Columns) | 1017 | foreach (DataColumn col in createPrimTable().Columns) |
1016 | { | 1018 | { |
1017 | if (!tmpDS.Tables["prims"].Columns.Contains(col.ColumnName)) | 1019 | if (!tmpDS.Tables["prims"].Columns.Contains(col.ColumnName)) |
1018 | { | 1020 | { |
1019 | MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName); | 1021 | m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName); |
1020 | return false; | 1022 | return false; |
1021 | } | 1023 | } |
1022 | } | 1024 | } |
@@ -1024,7 +1026,7 @@ namespace OpenSim.DataStore.MSSQL | |||
1024 | { | 1026 | { |
1025 | if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName)) | 1027 | if (!tmpDS.Tables["primshapes"].Columns.Contains(col.ColumnName)) |
1026 | { | 1028 | { |
1027 | MainLog.Instance.Verbose("DATASTORE", "Missing required column:" + col.ColumnName); | 1029 | m_log.Info("[DATASTORE]: Missing required column:" + col.ColumnName); |
1028 | return false; | 1030 | return false; |
1029 | } | 1031 | } |
1030 | } | 1032 | } |
@@ -1032,7 +1034,7 @@ namespace OpenSim.DataStore.MSSQL | |||
1032 | { | 1034 | { |
1033 | if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName)) | 1035 | if (!tmpDS.Tables["terrain"].Columns.Contains(col.ColumnName)) |
1034 | { | 1036 | { |
1035 | MainLog.Instance.Verbose("DATASTORE", "Missing require column:" + col.ColumnName); | 1037 | m_log.Info("[DATASTORE]: Missing require column:" + col.ColumnName); |
1036 | return false; | 1038 | return false; |
1037 | } | 1039 | } |
1038 | } | 1040 | } |
diff --git a/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs b/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs index 33537fa..219ab1c 100644 --- a/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/Terrain.BasicTerrain/Properties/AssemblyInfo.cs | |||
@@ -62,4 +62,4 @@ using System.Runtime.InteropServices; | |||
62 | // by using the '*' as shown below: | 62 | // by using the '*' as shown below: |
63 | 63 | ||
64 | [assembly : AssemblyVersion("1.0.0.0")] | 64 | [assembly : AssemblyVersion("1.0.0.0")] |
65 | [assembly : AssemblyFileVersion("1.0.0.0")] \ No newline at end of file | 65 | [assembly : AssemblyFileVersion("1.0.0.0")] |
diff --git a/OpenSim/Tests/Inventory/TestInventory.cs b/OpenSim/Tests/Inventory/TestInventory.cs index 697b335..e905dd8 100644 --- a/OpenSim/Tests/Inventory/TestInventory.cs +++ b/OpenSim/Tests/Inventory/TestInventory.cs | |||
@@ -52,10 +52,10 @@ namespace OpenSim.Test.Inventory | |||
52 | [TestFixtureSetUp] | 52 | [TestFixtureSetUp] |
53 | public void SetupInventoryTest() | 53 | public void SetupInventoryTest() |
54 | { | 54 | { |
55 | |||
56 | _agent_1_id = LLUUID.Random(); | 55 | _agent_1_id = LLUUID.Random(); |
57 | 56 | ||
58 | MainLog.Instance = new LogBase("UnitTest.log", "TEST", null, false); | 57 | MainConsole.Instance = new ConsoleBase("TEST", null); |
58 | |||
59 | // _dbPlugin = new SQLiteInventoryStore(); | 59 | // _dbPlugin = new SQLiteInventoryStore(); |
60 | _dbPlugin = new MySQLInventoryData(); | 60 | _dbPlugin = new MySQLInventoryData(); |
61 | _dbPlugin.Initialise(); | 61 | _dbPlugin.Initialise(); |
diff --git a/OpenSim/Tests/UserServer/Stress/UserServerStressTest.cs b/OpenSim/Tests/UserServer/Stress/UserServerStressTest.cs index b060559..a523d83 100644 --- a/OpenSim/Tests/UserServer/Stress/UserServerStressTest.cs +++ b/OpenSim/Tests/UserServer/Stress/UserServerStressTest.cs | |||
@@ -37,6 +37,8 @@ namespace OpenSim.Tests.UserServer.Stress | |||
37 | { | 37 | { |
38 | public static void Main(string[] args) | 38 | public static void Main(string[] args) |
39 | { | 39 | { |
40 | log4net.Config.XmlConfigurator.Configure(); | ||
41 | |||
40 | System.Console.WriteLine("Aborting - not yet functional"); | 42 | System.Console.WriteLine("Aborting - not yet functional"); |
41 | } | 43 | } |
42 | } | 44 | } |
diff --git a/OpenSim/Tools/Export/OpenSimExport.cs b/OpenSim/Tools/Export/OpenSimExport.cs index 8f4957c..8eebe35 100644 --- a/OpenSim/Tools/Export/OpenSimExport.cs +++ b/OpenSim/Tools/Export/OpenSimExport.cs | |||
@@ -47,10 +47,7 @@ namespace OpenSim.Tools.Export | |||
47 | // AddinManager.Initialize("."); | 47 | // AddinManager.Initialize("."); |
48 | // AddinManager.Registry.Update(null); | 48 | // AddinManager.Registry.Update(null); |
49 | 49 | ||
50 | // TODO: this really sucks, but given the way we do | 50 | MainConsole.Instance = CreateConsole(); |
51 | // logging in OpenSim, we need to establish a log up front | ||
52 | |||
53 | MainLog.Instance = CreateLog(); | ||
54 | 51 | ||
55 | sman = new StorageManager( | 52 | sman = new StorageManager( |
56 | startup.GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll"), | 53 | startup.GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll"), |
@@ -61,6 +58,8 @@ namespace OpenSim.Tools.Export | |||
61 | 58 | ||
62 | public static void Main(string[] args) | 59 | public static void Main(string[] args) |
63 | { | 60 | { |
61 | log4net.Config.XmlConfigurator.Configure(); | ||
62 | |||
64 | OpenSimExport export = new OpenSimExport(InitConfig(args)); | 63 | OpenSimExport export = new OpenSimExport(InitConfig(args)); |
65 | RegionInfo reg = new RegionInfo("Sara Jane", "Regions/1000-1000.xml",false); | 64 | RegionInfo reg = new RegionInfo("Sara Jane", "Regions/1000-1000.xml",false); |
66 | 65 | ||
@@ -71,17 +70,11 @@ namespace OpenSim.Tools.Export | |||
71 | } | 70 | } |
72 | } | 71 | } |
73 | 72 | ||
74 | protected LogBase CreateLog() | 73 | protected ConsoleBase CreateConsole() |
75 | { | 74 | { |
76 | if (!Directory.Exists(Util.logDir())) | 75 | return new ConsoleBase("Export", null); |
77 | { | ||
78 | Directory.CreateDirectory(Util.logDir()); | ||
79 | } | ||
80 | |||
81 | return new LogBase((Path.Combine(Util.logDir(), "export.log")), "Export", null, true); | ||
82 | } | 76 | } |
83 | 77 | ||
84 | |||
85 | private static IniConfigSource InitConfig(string[] args) | 78 | private static IniConfigSource InitConfig(string[] args) |
86 | { | 79 | { |
87 | Console.WriteLine("Good"); | 80 | Console.WriteLine("Good"); |
diff --git a/OpenSim/Tools/OpenSim.32BitLaunch/Program.cs b/OpenSim/Tools/OpenSim.32BitLaunch/Program.cs index ba7af25..78ba598 100644 --- a/OpenSim/Tools/OpenSim.32BitLaunch/Program.cs +++ b/OpenSim/Tools/OpenSim.32BitLaunch/Program.cs | |||
@@ -34,6 +34,8 @@ namespace OpenSim._32BitLaunch | |||
34 | { | 34 | { |
35 | static void Main(string[] args) | 35 | static void Main(string[] args) |
36 | { | 36 | { |
37 | log4net.Config.XmlConfigurator.Configure(); | ||
38 | |||
37 | System.Console.WriteLine("32-bit OpenSim executor"); | 39 | System.Console.WriteLine("32-bit OpenSim executor"); |
38 | System.Console.WriteLine("-----------------------"); | 40 | System.Console.WriteLine("-----------------------"); |
39 | System.Console.WriteLine(""); | 41 | System.Console.WriteLine(""); |
diff --git a/bin/OpenSim.32BitLaunch.exe.config b/bin/OpenSim.32BitLaunch.exe.config new file mode 100644 index 0000000..ebe552b --- /dev/null +++ b/bin/OpenSim.32BitLaunch.exe.config | |||
@@ -0,0 +1,28 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <configuration> | ||
3 | <configSections> | ||
4 | <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /> | ||
5 | </configSections> | ||
6 | <appSettings> | ||
7 | </appSettings> | ||
8 | <log4net> | ||
9 | <appender name="Console" type="log4net.Appender.ConsoleAppender"> | ||
10 | <layout type="log4net.Layout.PatternLayout"> | ||
11 | <conversionPattern value="%date %-5level %logger - %message%newline" /> | ||
12 | </layout> | ||
13 | </appender> | ||
14 | <appender name="LogFileAppender" type="log4net.Appender.FileAppender"> | ||
15 | <file value="OpenSim.32BitLaunch.log" /> | ||
16 | <appendToFile value="false" /> | ||
17 | <layout type="log4net.Layout.PatternLayout"> | ||
18 | <conversionPattern value="%date %-5level %logger - %message%newline" /> | ||
19 | </layout> | ||
20 | </appender> | ||
21 | |||
22 | <root> | ||
23 | <level value="DEBUG" /> | ||
24 | <appender-ref ref="Console" /> | ||
25 | <appender-ref ref="LogFileAppender" /> | ||
26 | </root> | ||
27 | </log4net> | ||
28 | </configuration> | ||
diff --git a/bin/OpenSim.Grid.AssetServer.exe.config b/bin/OpenSim.Grid.AssetServer.exe.config new file mode 100644 index 0000000..21bd6a0 --- /dev/null +++ b/bin/OpenSim.Grid.AssetServer.exe.config | |||
@@ -0,0 +1,28 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <configuration> | ||
3 | <configSections> | ||
4 | <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /> | ||
5 | </configSections> | ||
6 | <appSettings> | ||
7 | </appSettings> | ||
8 | <log4net> | ||
9 | <appender name="Console" type="log4net.Appender.ConsoleAppender"> | ||
10 | <layout type="log4net.Layout.PatternLayout"> | ||
11 | <conversionPattern value="%date %-5level %logger - %message%newline" /> | ||
12 | </layout> | ||
13 | </appender> | ||
14 | <appender name="LogFileAppender" type="log4net.Appender.FileAppender"> | ||
15 | <file value="OpenSim.Grid.AssetServer.log" /> | ||
16 | <appendToFile value="false" /> | ||
17 | <layout type="log4net.Layout.PatternLayout"> | ||
18 | <conversionPattern value="%date %-5level %logger - %message%newline" /> | ||
19 | </layout> | ||
20 | </appender> | ||
21 | |||
22 | <root> | ||
23 | <level value="DEBUG" /> | ||
24 | <appender-ref ref="Console" /> | ||
25 | <appender-ref ref="LogFileAppender" /> | ||
26 | </root> | ||
27 | </log4net> | ||
28 | </configuration> | ||
diff --git a/bin/OpenSim.Grid.GridServer.exe.config b/bin/OpenSim.Grid.GridServer.exe.config new file mode 100644 index 0000000..170db91 --- /dev/null +++ b/bin/OpenSim.Grid.GridServer.exe.config | |||
@@ -0,0 +1,28 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <configuration> | ||
3 | <configSections> | ||
4 | <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /> | ||
5 | </configSections> | ||
6 | <appSettings> | ||
7 | </appSettings> | ||
8 | <log4net> | ||
9 | <appender name="Console" type="log4net.Appender.ConsoleAppender"> | ||
10 | <layout type="log4net.Layout.PatternLayout"> | ||
11 | <conversionPattern value="%date %-5level %logger - %message%newline" /> | ||
12 | </layout> | ||
13 | </appender> | ||
14 | <appender name="LogFileAppender" type="log4net.Appender.FileAppender"> | ||
15 | <file value="OpenSim.Grid.GridServer.log" /> | ||
16 | <appendToFile value="false" /> | ||
17 | <layout type="log4net.Layout.PatternLayout"> | ||
18 | <conversionPattern value="%date %-5level %logger - %message%newline" /> | ||
19 | </layout> | ||
20 | </appender> | ||
21 | |||
22 | <root> | ||
23 | <level value="DEBUG" /> | ||
24 | <appender-ref ref="Console" /> | ||
25 | <appender-ref ref="LogFileAppender" /> | ||
26 | </root> | ||
27 | </log4net> | ||
28 | </configuration> | ||
diff --git a/bin/OpenSim.Grid.InventoryServer.exe.config b/bin/OpenSim.Grid.InventoryServer.exe.config new file mode 100644 index 0000000..a8e75b1 --- /dev/null +++ b/bin/OpenSim.Grid.InventoryServer.exe.config | |||
@@ -0,0 +1,28 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <configuration> | ||
3 | <configSections> | ||
4 | <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /> | ||
5 | </configSections> | ||
6 | <appSettings> | ||
7 | </appSettings> | ||
8 | <log4net> | ||
9 | <appender name="Console" type="log4net.Appender.ConsoleAppender"> | ||
10 | <layout type="log4net.Layout.PatternLayout"> | ||
11 | <conversionPattern value="%date %-5level %logger - %message%newline" /> | ||
12 | </layout> | ||
13 | </appender> | ||
14 | <appender name="LogFileAppender" type="log4net.Appender.FileAppender"> | ||
15 | <file value="OpenSim.Grid.InventoryServer.log" /> | ||
16 | <appendToFile value="false" /> | ||
17 | <layout type="log4net.Layout.PatternLayout"> | ||
18 | <conversionPattern value="%date %-5level %logger - %message%newline" /> | ||
19 | </layout> | ||
20 | </appender> | ||
21 | |||
22 | <root> | ||
23 | <level value="DEBUG" /> | ||
24 | <appender-ref ref="Console" /> | ||
25 | <appender-ref ref="LogFileAppender" /> | ||
26 | </root> | ||
27 | </log4net> | ||
28 | </configuration> | ||
diff --git a/bin/OpenSim.Grid.MessagingServer.exe.config b/bin/OpenSim.Grid.MessagingServer.exe.config new file mode 100644 index 0000000..2e240e0 --- /dev/null +++ b/bin/OpenSim.Grid.MessagingServer.exe.config | |||
@@ -0,0 +1,28 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <configuration> | ||
3 | <configSections> | ||
4 | <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /> | ||
5 | </configSections> | ||
6 | <appSettings> | ||
7 | </appSettings> | ||
8 | <log4net> | ||
9 | <appender name="Console" type="log4net.Appender.ConsoleAppender"> | ||
10 | <layout type="log4net.Layout.PatternLayout"> | ||
11 | <conversionPattern value="%date %-5level %logger - %message%newline" /> | ||
12 | </layout> | ||
13 | </appender> | ||
14 | <appender name="LogFileAppender" type="log4net.Appender.FileAppender"> | ||
15 | <file value="OpenSim.Grid.MessagingServer.log" /> | ||
16 | <appendToFile value="false" /> | ||
17 | <layout type="log4net.Layout.PatternLayout"> | ||
18 | <conversionPattern value="%date %-5level %logger - %message%newline" /> | ||
19 | </layout> | ||
20 | </appender> | ||
21 | |||
22 | <root> | ||
23 | <level value="DEBUG" /> | ||
24 | <appender-ref ref="Console" /> | ||
25 | <appender-ref ref="LogFileAppender" /> | ||
26 | </root> | ||
27 | </log4net> | ||
28 | </configuration> | ||
diff --git a/bin/OpenSim.Grid.ScriptServer.exe.config b/bin/OpenSim.Grid.ScriptServer.exe.config new file mode 100644 index 0000000..5e58f58 --- /dev/null +++ b/bin/OpenSim.Grid.ScriptServer.exe.config | |||
@@ -0,0 +1,28 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <configuration> | ||
3 | <configSections> | ||
4 | <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /> | ||
5 | </configSections> | ||
6 | <appSettings> | ||
7 | </appSettings> | ||
8 | <log4net> | ||
9 | <appender name="Console" type="log4net.Appender.ConsoleAppender"> | ||
10 | <layout type="log4net.Layout.PatternLayout"> | ||
11 | <conversionPattern value="%date %-5level %logger - %message%newline" /> | ||
12 | </layout> | ||
13 | </appender> | ||
14 | <appender name="LogFileAppender" type="log4net.Appender.FileAppender"> | ||
15 | <file value="OpenSim.Grid.ScriptServer.log" /> | ||
16 | <appendToFile value="false" /> | ||
17 | <layout type="log4net.Layout.PatternLayout"> | ||
18 | <conversionPattern value="%date %-5level %logger - %message%newline" /> | ||
19 | </layout> | ||
20 | </appender> | ||
21 | |||
22 | <root> | ||
23 | <level value="DEBUG" /> | ||
24 | <appender-ref ref="Console" /> | ||
25 | <appender-ref ref="LogFileAppender" /> | ||
26 | </root> | ||
27 | </log4net> | ||
28 | </configuration> | ||
diff --git a/bin/OpenSim.Grid.UserServer.exe.config b/bin/OpenSim.Grid.UserServer.exe.config new file mode 100644 index 0000000..63f62ba --- /dev/null +++ b/bin/OpenSim.Grid.UserServer.exe.config | |||
@@ -0,0 +1,28 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <configuration> | ||
3 | <configSections> | ||
4 | <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /> | ||
5 | </configSections> | ||
6 | <appSettings> | ||
7 | </appSettings> | ||
8 | <log4net> | ||
9 | <appender name="Console" type="log4net.Appender.ConsoleAppender"> | ||
10 | <layout type="log4net.Layout.PatternLayout"> | ||
11 | <conversionPattern value="%date %-5level %logger - %message%newline" /> | ||
12 | </layout> | ||
13 | </appender> | ||
14 | <appender name="LogFileAppender" type="log4net.Appender.FileAppender"> | ||
15 | <file value="OpenSim.Grid.UserServer.log" /> | ||
16 | <appendToFile value="false" /> | ||
17 | <layout type="log4net.Layout.PatternLayout"> | ||
18 | <conversionPattern value="%date %-5level %logger - %message%newline" /> | ||
19 | </layout> | ||
20 | </appender> | ||
21 | |||
22 | <root> | ||
23 | <level value="DEBUG" /> | ||
24 | <appender-ref ref="Console" /> | ||
25 | <appender-ref ref="LogFileAppender" /> | ||
26 | </root> | ||
27 | </log4net> | ||
28 | </configuration> | ||
diff --git a/bin/OpenSim.exe.config b/bin/OpenSim.exe.config new file mode 100644 index 0000000..9d2aaed --- /dev/null +++ b/bin/OpenSim.exe.config | |||
@@ -0,0 +1,28 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <configuration> | ||
3 | <configSections> | ||
4 | <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /> | ||
5 | </configSections> | ||
6 | <appSettings> | ||
7 | </appSettings> | ||
8 | <log4net> | ||
9 | <appender name="Console" type="log4net.Appender.ConsoleAppender"> | ||
10 | <layout type="log4net.Layout.PatternLayout"> | ||
11 | <conversionPattern value="%date %-5level %logger - %message%newline" /> | ||
12 | </layout> | ||
13 | </appender> | ||
14 | <appender name="LogFileAppender" type="log4net.Appender.FileAppender"> | ||
15 | <file value="OpenSim.log" /> | ||
16 | <appendToFile value="false" /> | ||
17 | <layout type="log4net.Layout.PatternLayout"> | ||
18 | <conversionPattern value="%date %-5level %logger - %message%newline" /> | ||
19 | </layout> | ||
20 | </appender> | ||
21 | |||
22 | <root> | ||
23 | <level value="DEBUG" /> | ||
24 | <appender-ref ref="Console" /> | ||
25 | <appender-ref ref="LogFileAppender" /> | ||
26 | </root> | ||
27 | </log4net> | ||
28 | </configuration> | ||
diff --git a/bin/OpenSimExport.exe.config b/bin/OpenSimExport.exe.config new file mode 100644 index 0000000..fce85b2 --- /dev/null +++ b/bin/OpenSimExport.exe.config | |||
@@ -0,0 +1,28 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <configuration> | ||
3 | <configSections> | ||
4 | <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /> | ||
5 | </configSections> | ||
6 | <appSettings> | ||
7 | </appSettings> | ||
8 | <log4net> | ||
9 | <appender name="Console" type="log4net.Appender.ConsoleAppender"> | ||
10 | <layout type="log4net.Layout.PatternLayout"> | ||
11 | <conversionPattern value="%date %-5level %logger - %message%newline" /> | ||
12 | </layout> | ||
13 | </appender> | ||
14 | <appender name="LogFileAppender" type="log4net.Appender.FileAppender"> | ||
15 | <file value="OpenSimExport.log" /> | ||
16 | <appendToFile value="false" /> | ||
17 | <layout type="log4net.Layout.PatternLayout"> | ||
18 | <conversionPattern value="%date %-5level %logger - %message%newline" /> | ||
19 | </layout> | ||
20 | </appender> | ||
21 | |||
22 | <root> | ||
23 | <level value="DEBUG" /> | ||
24 | <appender-ref ref="Console" /> | ||
25 | <appender-ref ref="LogFileAppender" /> | ||
26 | </root> | ||
27 | </log4net> | ||
28 | </configuration> | ||
diff --git a/bin/SimpleApp.exe.config b/bin/SimpleApp.exe.config new file mode 100644 index 0000000..3156c73 --- /dev/null +++ b/bin/SimpleApp.exe.config | |||
@@ -0,0 +1,28 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <configuration> | ||
3 | <configSections> | ||
4 | <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler,log4net" /> | ||
5 | </configSections> | ||
6 | <appSettings> | ||
7 | </appSettings> | ||
8 | <log4net> | ||
9 | <appender name="Console" type="log4net.Appender.ConsoleAppender"> | ||
10 | <layout type="log4net.Layout.PatternLayout"> | ||
11 | <conversionPattern value="%date %-5level %logger - %message%newline" /> | ||
12 | </layout> | ||
13 | </appender> | ||
14 | <appender name="LogFileAppender" type="log4net.Appender.FileAppender"> | ||
15 | <file value="SimpleApp.log" /> | ||
16 | <appendToFile value="false" /> | ||
17 | <layout type="log4net.Layout.PatternLayout"> | ||
18 | <conversionPattern value="%date %-5level %logger - %message%newline" /> | ||
19 | </layout> | ||
20 | </appender> | ||
21 | |||
22 | <root> | ||
23 | <level value="DEBUG" /> | ||
24 | <appender-ref ref="Console" /> | ||
25 | <appender-ref ref="LogFileAppender" /> | ||
26 | </root> | ||
27 | </log4net> | ||
28 | </configuration> | ||
diff --git a/prebuild.xml b/prebuild.xml index 7e69bea..8d93e98 100644 --- a/prebuild.xml +++ b/prebuild.xml | |||
@@ -48,11 +48,12 @@ | |||
48 | 48 | ||
49 | <ReferencePath>../../../bin/</ReferencePath> | 49 | <ReferencePath>../../../bin/</ReferencePath> |
50 | <Reference name="System" localCopy="false"/> | 50 | <Reference name="System" localCopy="false"/> |
51 | <Reference name="log4net"/> | ||
51 | <Files> | 52 | <Files> |
52 | <Match pattern="*.cs" recurse="true"/> | 53 | <Match pattern="*.cs" recurse="true"/> |
53 | </Files> | 54 | </Files> |
54 | </Project> | 55 | </Project> |
55 | 56 | ||
56 | <Project name="OpenSim.Framework" path="OpenSim/Framework" type="Library"> | 57 | <Project name="OpenSim.Framework" path="OpenSim/Framework" type="Library"> |
57 | <Configuration name="Debug"> | 58 | <Configuration name="Debug"> |
58 | <Options> | 59 | <Options> |
@@ -74,6 +75,7 @@ | |||
74 | <Reference name="XMLRPC.dll"/> | 75 | <Reference name="XMLRPC.dll"/> |
75 | <Reference name="OpenSim.Framework.Console"/> | 76 | <Reference name="OpenSim.Framework.Console"/> |
76 | <Reference name="Nini.dll" /> | 77 | <Reference name="Nini.dll" /> |
78 | <Reference name="log4net"/> | ||
77 | <Files> | 79 | <Files> |
78 | <Match pattern="*.cs" recurse="false"/> | 80 | <Match pattern="*.cs" recurse="false"/> |
79 | </Files> | 81 | </Files> |
@@ -143,6 +145,7 @@ | |||
143 | <Reference name="OpenSim.Framework"/> | 145 | <Reference name="OpenSim.Framework"/> |
144 | <Reference name="MySql.Data.dll"/> | 146 | <Reference name="MySql.Data.dll"/> |
145 | <Reference name="TribalMedia.Framework.Data"/> | 147 | <Reference name="TribalMedia.Framework.Data"/> |
148 | <Reference name="log4net"/> | ||
146 | <Files> | 149 | <Files> |
147 | <Match pattern="*.cs" recurse="true"/> | 150 | <Match pattern="*.cs" recurse="true"/> |
148 | </Files> | 151 | </Files> |
@@ -174,7 +177,7 @@ | |||
174 | </Files> | 177 | </Files> |
175 | </Project> | 178 | </Project> |
176 | 179 | ||
177 | <Project name="OpenSim.Framework.Configuration.HTTP" path="OpenSim/Framework/Configuration/HTTP" type="Library"> | 180 | <Project name="OpenSim.Framework.Configuration.HTTP" path="OpenSim/Framework/Configuration/HTTP" type="Library"> |
178 | <Configuration name="Debug"> | 181 | <Configuration name="Debug"> |
179 | <Options> | 182 | <Options> |
180 | <OutputPath>../../../../bin/</OutputPath> | 183 | <OutputPath>../../../../bin/</OutputPath> |
@@ -196,6 +199,7 @@ | |||
196 | <Reference name="OpenSim.Framework.Console"/> | 199 | <Reference name="OpenSim.Framework.Console"/> |
197 | <Reference name="OpenSim.Framework.Configuration.XML"/> | 200 | <Reference name="OpenSim.Framework.Configuration.XML"/> |
198 | <Reference name="OpenSim.Framework.Data"/> | 201 | <Reference name="OpenSim.Framework.Data"/> |
202 | <Reference name="log4net"/> | ||
199 | <Files> | 203 | <Files> |
200 | <Match pattern="*.cs" recurse="true"/> | 204 | <Match pattern="*.cs" recurse="true"/> |
201 | </Files> | 205 | </Files> |
@@ -220,7 +224,7 @@ | |||
220 | <Reference name="OpenSim.Framework"/> | 224 | <Reference name="OpenSim.Framework"/> |
221 | <Reference name="libsecondlife.dll"/> | 225 | <Reference name="libsecondlife.dll"/> |
222 | <Reference name="Nini.dll" /> | 226 | <Reference name="Nini.dll" /> |
223 | 227 | <Reference name="log4net"/> | |
224 | <Files> | 228 | <Files> |
225 | <Match pattern="*.cs" recurse="true"/> | 229 | <Match pattern="*.cs" recurse="true"/> |
226 | </Files> | 230 | </Files> |
@@ -247,6 +251,7 @@ | |||
247 | <Reference name="OpenSim.Framework"/> | 251 | <Reference name="OpenSim.Framework"/> |
248 | <Reference name="OpenSim.Framework.Console"/> | 252 | <Reference name="OpenSim.Framework.Console"/> |
249 | <Reference name="Nini.dll" /> | 253 | <Reference name="Nini.dll" /> |
254 | <Reference name="log4net"/> | ||
250 | <Files> | 255 | <Files> |
251 | <Match pattern="*.cs" recurse="true"/> | 256 | <Match pattern="*.cs" recurse="true"/> |
252 | </Files> | 257 | </Files> |
@@ -297,6 +302,7 @@ | |||
297 | <Reference name="OpenSim.Framework.Console"/> | 302 | <Reference name="OpenSim.Framework.Console"/> |
298 | <Reference name="libsecondlife.dll"/> | 303 | <Reference name="libsecondlife.dll"/> |
299 | <Reference name="XMLRPC.dll"/> | 304 | <Reference name="XMLRPC.dll"/> |
305 | <Reference name="log4net"/> | ||
300 | 306 | ||
301 | <Files> | 307 | <Files> |
302 | <Match pattern="*.cs" recurse="true"/> | 308 | <Match pattern="*.cs" recurse="true"/> |
@@ -322,8 +328,10 @@ | |||
322 | <Reference name="Axiom.MathLib.dll" localCopy="false"/> | 328 | <Reference name="Axiom.MathLib.dll" localCopy="false"/> |
323 | <Reference name="OpenSim.Framework" localCopy="false"/> | 329 | <Reference name="OpenSim.Framework" localCopy="false"/> |
324 | <Reference name="OpenSim.Framework.Console" localCopy="false"/> | 330 | <Reference name="OpenSim.Framework.Console" localCopy="false"/> |
325 | <Reference name="Nini.dll" /> | 331 | <Reference name="Nini.dll" /> |
326 | <Files> | 332 | <Reference name="log4net"/> |
333 | |||
334 | <Files> | ||
327 | <Match pattern="*.cs" recurse="false"/> | 335 | <Match pattern="*.cs" recurse="false"/> |
328 | </Files> | 336 | </Files> |
329 | </Project> | 337 | </Project> |
@@ -418,6 +426,7 @@ | |||
418 | <Reference name="OpenSim.Framework.Console"/> | 426 | <Reference name="OpenSim.Framework.Console"/> |
419 | <Reference name="OpenSim.Region.Physics.Manager" localCopy="false"/> | 427 | <Reference name="OpenSim.Region.Physics.Manager" localCopy="false"/> |
420 | <Reference name="Ode.NET.dll" localCopy="false" /> | 428 | <Reference name="Ode.NET.dll" localCopy="false" /> |
429 | <Reference name="log4net"/> | ||
421 | 430 | ||
422 | <Files> | 431 | <Files> |
423 | <Match pattern="*.cs" recurse="true"/> | 432 | <Match pattern="*.cs" recurse="true"/> |
@@ -440,11 +449,12 @@ | |||
440 | <Reference name="System" localCopy="false"/> | 449 | <Reference name="System" localCopy="false"/> |
441 | <Reference name="libsecondlife.dll"/> | 450 | <Reference name="libsecondlife.dll"/> |
442 | <Reference name="Axiom.MathLib.dll" localCopy="false"/> | 451 | <Reference name="Axiom.MathLib.dll" localCopy="false"/> |
443 | <Reference name="OpenSim.Framework"/> | 452 | <Reference name="OpenSim.Framework"/> |
444 | <Reference name="OpenSim.Framework.Console" localCopy="false"/> | 453 | <Reference name="OpenSim.Framework.Console" localCopy="false"/> |
445 | <Reference name="OpenSim.Region.Physics.Manager" localCopy="false"/> | 454 | <Reference name="OpenSim.Region.Physics.Manager" localCopy="false"/> |
446 | <Reference name="Modified.XnaDevRu.BulletX.dll" localCopy="false" /> | 455 | <Reference name="Modified.XnaDevRu.BulletX.dll" localCopy="false" /> |
447 | <Reference name="MonoXnaCompactMaths.dll" localCopy="false" /> | 456 | <Reference name="MonoXnaCompactMaths.dll" localCopy="false" /> |
457 | <Reference name="log4net"/> | ||
448 | 458 | ||
449 | <Files> | 459 | <Files> |
450 | <Match pattern="*.cs" recurse="true"/> | 460 | <Match pattern="*.cs" recurse="true"/> |
@@ -468,9 +478,10 @@ | |||
468 | <Reference name="libsecondlife.dll"/> | 478 | <Reference name="libsecondlife.dll"/> |
469 | <Reference name="OpenSim.Framework"/> | 479 | <Reference name="OpenSim.Framework"/> |
470 | <Reference name="OpenSim.Framework.Console"/> | 480 | <Reference name="OpenSim.Framework.Console"/> |
471 | <Reference name="OpenSim.Region.Physics.Manager" localCopy="false"/> | 481 | <Reference name="OpenSim.Region.Physics.Manager" localCopy="false"/> |
482 | <Reference name="log4net"/> | ||
472 | 483 | ||
473 | <Files> | 484 | <Files> |
474 | <Match pattern="*.cs" recurse="true"/> | 485 | <Match pattern="*.cs" recurse="true"/> |
475 | </Files> | 486 | </Files> |
476 | </Project> | 487 | </Project> |
@@ -524,6 +535,8 @@ | |||
524 | <Reference name="OpenSim.Framework.Data"/> | 535 | <Reference name="OpenSim.Framework.Data"/> |
525 | <Reference name="libsecondlife.dll"/> | 536 | <Reference name="libsecondlife.dll"/> |
526 | <Reference name="Db4objects.Db4o.dll"/> | 537 | <Reference name="Db4objects.Db4o.dll"/> |
538 | <Reference name="log4net"/> | ||
539 | |||
527 | <Files> | 540 | <Files> |
528 | <Match pattern="*.cs" recurse="true"/> | 541 | <Match pattern="*.cs" recurse="true"/> |
529 | </Files> | 542 | </Files> |
@@ -556,6 +569,7 @@ | |||
556 | <Reference name="Db4objects.Db4o.dll"/> | 569 | <Reference name="Db4objects.Db4o.dll"/> |
557 | <Reference name="Nini.dll" /> | 570 | <Reference name="Nini.dll" /> |
558 | <Reference name="XMLRPC.dll"/> | 571 | <Reference name="XMLRPC.dll"/> |
572 | <Reference name="log4net"/> | ||
559 | 573 | ||
560 | <Files> | 574 | <Files> |
561 | <Match pattern="*.cs" recurse="true"/> | 575 | <Match pattern="*.cs" recurse="true"/> |
@@ -585,6 +599,7 @@ | |||
585 | <Reference name="OpenSim.Framework.Statistics"/> | 599 | <Reference name="OpenSim.Framework.Statistics"/> |
586 | <Reference name="libsecondlife.dll"/> | 600 | <Reference name="libsecondlife.dll"/> |
587 | <Reference name="XMLRPC.dll"/> | 601 | <Reference name="XMLRPC.dll"/> |
602 | <Reference name="log4net"/> | ||
588 | 603 | ||
589 | <Files> | 604 | <Files> |
590 | <Match pattern="*.cs" recurse="true"/> | 605 | <Match pattern="*.cs" recurse="true"/> |
@@ -614,9 +629,9 @@ | |||
614 | <Reference name="OpenSim.Framework.Servers"/> | 629 | <Reference name="OpenSim.Framework.Servers"/> |
615 | <Reference name="OpenSim.Framework.Communications" /> | 630 | <Reference name="OpenSim.Framework.Communications" /> |
616 | <Reference name="OpenSim.Region.Communications.Local" /> | 631 | <Reference name="OpenSim.Region.Communications.Local" /> |
617 | |||
618 | <Reference name="libsecondlife.dll"/> | 632 | <Reference name="libsecondlife.dll"/> |
619 | <Reference name="XMLRPC.dll"/> | 633 | <Reference name="XMLRPC.dll"/> |
634 | <Reference name="log4net"/> | ||
620 | 635 | ||
621 | <Files> | 636 | <Files> |
622 | <Match pattern="*.cs" recurse="true"/> | 637 | <Match pattern="*.cs" recurse="true"/> |
@@ -654,6 +669,7 @@ | |||
654 | <Reference name="OpenSim.Framework.Communications"/> | 669 | <Reference name="OpenSim.Framework.Communications"/> |
655 | <Reference name="TribalMedia.Framework.Data"/> | 670 | <Reference name="TribalMedia.Framework.Data"/> |
656 | <Reference name="Nini.dll" /> | 671 | <Reference name="Nini.dll" /> |
672 | <Reference name="log4net"/> | ||
657 | <Files> | 673 | <Files> |
658 | <Match pattern="*.cs" recurse="true"/> | 674 | <Match pattern="*.cs" recurse="true"/> |
659 | </Files> | 675 | </Files> |
@@ -688,9 +704,9 @@ | |||
688 | <Reference name="OpenSim.Region.Physics.Manager"/> | 704 | <Reference name="OpenSim.Region.Physics.Manager"/> |
689 | <Reference name="XMLRPC.dll"/> | 705 | <Reference name="XMLRPC.dll"/> |
690 | <Reference name="Nini.dll" /> | 706 | <Reference name="Nini.dll" /> |
707 | <Reference name="log4net"/> | ||
691 | 708 | ||
692 | 709 | <Files> | |
693 | <Files> | ||
694 | <Match pattern="*.cs" recurse="true"/> | 710 | <Match pattern="*.cs" recurse="true"/> |
695 | </Files> | 711 | </Files> |
696 | </Project> | 712 | </Project> |
@@ -715,6 +731,8 @@ | |||
715 | <Reference name="OpenSim.Framework"/> | 731 | <Reference name="OpenSim.Framework"/> |
716 | <Reference name="OpenSim.Region.Environment"/> | 732 | <Reference name="OpenSim.Region.Environment"/> |
717 | <Reference name="OpenSim.Framework.Console"/> | 733 | <Reference name="OpenSim.Framework.Console"/> |
734 | <Reference name="log4net"/> | ||
735 | |||
718 | <Files> | 736 | <Files> |
719 | <Match pattern="*.cs" recurse="true"/> | 737 | <Match pattern="*.cs" recurse="true"/> |
720 | </Files> | 738 | </Files> |
@@ -741,6 +759,8 @@ | |||
741 | <Reference name="OpenSim.Framework.Data"/> | 759 | <Reference name="OpenSim.Framework.Data"/> |
742 | <Reference name="OpenSim.Region.Environment"/> | 760 | <Reference name="OpenSim.Region.Environment"/> |
743 | <Reference name="OpenSim.Framework.Console"/> | 761 | <Reference name="OpenSim.Framework.Console"/> |
762 | <Reference name="log4net"/> | ||
763 | |||
744 | <Files> | 764 | <Files> |
745 | <Match pattern="*.cs" recurse="true"/> | 765 | <Match pattern="*.cs" recurse="true"/> |
746 | </Files> | 766 | </Files> |
@@ -768,6 +788,8 @@ | |||
768 | <Reference name="OpenSim.Framework.Console"/> | 788 | <Reference name="OpenSim.Framework.Console"/> |
769 | <Reference name="Axiom.MathLib.dll"/> | 789 | <Reference name="Axiom.MathLib.dll"/> |
770 | <Reference name="Nini.dll"/> | 790 | <Reference name="Nini.dll"/> |
791 | <Reference name="log4net"/> | ||
792 | |||
771 | <Files> | 793 | <Files> |
772 | <Match pattern="*.cs" recurse="true"/> | 794 | <Match pattern="*.cs" recurse="true"/> |
773 | </Files> | 795 | </Files> |
@@ -807,6 +829,8 @@ | |||
807 | <Reference name="XMLRPC.dll"/> | 829 | <Reference name="XMLRPC.dll"/> |
808 | <Reference name="OpenSim.Region.Communications.Local"/> | 830 | <Reference name="OpenSim.Region.Communications.Local"/> |
809 | <Reference name="Nini.dll" /> | 831 | <Reference name="Nini.dll" /> |
832 | <Reference name="log4net"/> | ||
833 | |||
810 | <Files> | 834 | <Files> |
811 | <Match pattern="*.cs" recurse="true"/> | 835 | <Match pattern="*.cs" recurse="true"/> |
812 | </Files> | 836 | </Files> |
@@ -838,6 +862,8 @@ | |||
838 | <Reference name="OpenSim.Framework.RegionLoader.Filesystem"/> | 862 | <Reference name="OpenSim.Framework.RegionLoader.Filesystem"/> |
839 | <Reference name="OpenSim.Framework.RegionLoader.Web"/> | 863 | <Reference name="OpenSim.Framework.RegionLoader.Web"/> |
840 | <Reference name="OpenSim.Framework.Servers"/> | 864 | <Reference name="OpenSim.Framework.Servers"/> |
865 | <Reference name="log4net"/> | ||
866 | |||
841 | <Files> | 867 | <Files> |
842 | <Match pattern="*.cs" recurse="true"/> | 868 | <Match pattern="*.cs" recurse="true"/> |
843 | </Files> | 869 | </Files> |
@@ -868,6 +894,8 @@ | |||
868 | <Reference name="OpenSim.Framework"/> | 894 | <Reference name="OpenSim.Framework"/> |
869 | <Reference name="OpenSim.Framework.Servers"/> | 895 | <Reference name="OpenSim.Framework.Servers"/> |
870 | <Reference name="OpenSim.Framework.Console"/> | 896 | <Reference name="OpenSim.Framework.Console"/> |
897 | <Reference name="log4net"/> | ||
898 | |||
871 | <Files> | 899 | <Files> |
872 | <Match pattern="*.cs" recurse="true"/> | 900 | <Match pattern="*.cs" recurse="true"/> |
873 | </Files> | 901 | </Files> |
@@ -909,6 +937,7 @@ | |||
909 | <Reference name="OpenSim.Region.Environment"/> | 937 | <Reference name="OpenSim.Region.Environment"/> |
910 | <Reference name="OpenSim.Region.Terrain.BasicTerrain"/> | 938 | <Reference name="OpenSim.Region.Terrain.BasicTerrain"/> |
911 | <Reference name="Nini.dll" /> | 939 | <Reference name="Nini.dll" /> |
940 | <Reference name="log4net"/> | ||
912 | 941 | ||
913 | <Files> | 942 | <Files> |
914 | <Match pattern="*.cs" recurse="true"/> | 943 | <Match pattern="*.cs" recurse="true"/> |
@@ -933,11 +962,12 @@ | |||
933 | <Reference name="System.Data"/> | 962 | <Reference name="System.Data"/> |
934 | <Reference name="OpenSim.Framework"/> | 963 | <Reference name="OpenSim.Framework"/> |
935 | <Reference name="OpenSim.Framework.Data"/> | 964 | <Reference name="OpenSim.Framework.Data"/> |
936 | <!-- <Reference name="TribalMedia.Framework.Data"/> --> | 965 | <!-- <Reference name="TribalMedia.Framework.Data"/> --> |
937 | <Reference name="libsecondlife.dll"/> | 966 | <Reference name="libsecondlife.dll"/> |
938 | <Reference name="MySql.Data.dll"/> | 967 | <Reference name="MySql.Data.dll"/> |
939 | <Reference name="OpenSim.Framework.Console"/> | 968 | <Reference name="OpenSim.Framework.Console"/> |
940 | <Reference name="OpenSim.Region.Environment"/> | 969 | <Reference name="OpenSim.Region.Environment"/> |
970 | <Reference name="log4net"/> | ||
941 | 971 | ||
942 | <Files> | 972 | <Files> |
943 | <Match pattern="*.cs" recurse="true"/> | 973 | <Match pattern="*.cs" recurse="true"/> |
@@ -965,6 +995,7 @@ | |||
965 | <Reference name="OpenSim.Framework.Data"/> | 995 | <Reference name="OpenSim.Framework.Data"/> |
966 | <Reference name="OpenSim.Framework.Console"/> | 996 | <Reference name="OpenSim.Framework.Console"/> |
967 | <Reference name="libsecondlife.dll"/> | 997 | <Reference name="libsecondlife.dll"/> |
998 | <Reference name="log4net"/> | ||
968 | 999 | ||
969 | <Files> | 1000 | <Files> |
970 | <Match pattern="*.cs" recurse="true"/> | 1001 | <Match pattern="*.cs" recurse="true"/> |
@@ -995,6 +1026,8 @@ | |||
995 | <Reference name="OpenSim.Region.Environment"/> | 1026 | <Reference name="OpenSim.Region.Environment"/> |
996 | <Reference name="libsecondlife.dll"/> | 1027 | <Reference name="libsecondlife.dll"/> |
997 | <Reference name="Mono.Data.SqliteClient"/> | 1028 | <Reference name="Mono.Data.SqliteClient"/> |
1029 | <Reference name="log4net"/> | ||
1030 | |||
998 | <Files> | 1031 | <Files> |
999 | <Match pattern="*.cs" recurse="true"/> | 1032 | <Match pattern="*.cs" recurse="true"/> |
1000 | <Match path="Resources" pattern="*.sql" buildAction="EmbeddedResource"/> | 1033 | <Match path="Resources" pattern="*.sql" buildAction="EmbeddedResource"/> |
@@ -1003,7 +1036,6 @@ | |||
1003 | 1036 | ||
1004 | <!-- OGS projects --> | 1037 | <!-- OGS projects --> |
1005 | 1038 | ||
1006 | |||
1007 | <Project name="OpenSim.Grid.GridServer" path="OpenSim/Grid/GridServer" type="Exe"> | 1039 | <Project name="OpenSim.Grid.GridServer" path="OpenSim/Grid/GridServer" type="Exe"> |
1008 | <Configuration name="Debug"> | 1040 | <Configuration name="Debug"> |
1009 | <Options> | 1041 | <Options> |
@@ -1027,6 +1059,7 @@ | |||
1027 | <Reference name="libsecondlife.dll"/> | 1059 | <Reference name="libsecondlife.dll"/> |
1028 | <Reference name="Db4objects.Db4o.dll"/> | 1060 | <Reference name="Db4objects.Db4o.dll"/> |
1029 | <Reference name="XMLRPC.dll"/> | 1061 | <Reference name="XMLRPC.dll"/> |
1062 | <Reference name="log4net"/> | ||
1030 | 1063 | ||
1031 | <Files> | 1064 | <Files> |
1032 | <Match pattern="*.cs" recurse="true"/> | 1065 | <Match pattern="*.cs" recurse="true"/> |
@@ -1056,6 +1089,7 @@ | |||
1056 | <Reference name="OpenSim.Framework.Communications"/> | 1089 | <Reference name="OpenSim.Framework.Communications"/> |
1057 | <Reference name="OpenSim.Framework.Statistics"/> | 1090 | <Reference name="OpenSim.Framework.Statistics"/> |
1058 | <Reference name="libsecondlife.dll"/> | 1091 | <Reference name="libsecondlife.dll"/> |
1092 | <Reference name="log4net"/> | ||
1059 | 1093 | ||
1060 | <Files> | 1094 | <Files> |
1061 | <Match pattern="*.cs" recurse="true"/> | 1095 | <Match pattern="*.cs" recurse="true"/> |
@@ -1088,6 +1122,7 @@ | |||
1088 | <Reference name="libsecondlife.dll"/> | 1122 | <Reference name="libsecondlife.dll"/> |
1089 | <Reference name="Db4objects.Db4o.dll"/> | 1123 | <Reference name="Db4objects.Db4o.dll"/> |
1090 | <Reference name="XMLRPC.dll"/> | 1124 | <Reference name="XMLRPC.dll"/> |
1125 | <Reference name="log4net"/> | ||
1091 | 1126 | ||
1092 | <Files> | 1127 | <Files> |
1093 | <Match pattern="*.cs" recurse="true"/> | 1128 | <Match pattern="*.cs" recurse="true"/> |
@@ -1116,6 +1151,7 @@ | |||
1116 | <Reference name="OpenSim.Framework.Data"/> | 1151 | <Reference name="OpenSim.Framework.Data"/> |
1117 | <Reference name="OpenSim.Framework.Servers"/> | 1152 | <Reference name="OpenSim.Framework.Servers"/> |
1118 | <Reference name="libsecondlife.dll"/> | 1153 | <Reference name="libsecondlife.dll"/> |
1154 | <Reference name="log4net"/> | ||
1119 | 1155 | ||
1120 | <Files> | 1156 | <Files> |
1121 | <Match pattern="*.cs" recurse="true"/> | 1157 | <Match pattern="*.cs" recurse="true"/> |
@@ -1145,6 +1181,7 @@ | |||
1145 | <Reference name="OpenSim.Framework.Servers"/> | 1181 | <Reference name="OpenSim.Framework.Servers"/> |
1146 | <Reference name="libsecondlife.dll"/> | 1182 | <Reference name="libsecondlife.dll"/> |
1147 | <Reference name="XMLRPC.dll"/> | 1183 | <Reference name="XMLRPC.dll"/> |
1184 | <Reference name="log4net"/> | ||
1148 | 1185 | ||
1149 | <Files> | 1186 | <Files> |
1150 | <Match pattern="*.cs" recurse="true"/> | 1187 | <Match pattern="*.cs" recurse="true"/> |
@@ -1181,14 +1218,13 @@ | |||
1181 | <Reference name="OpenSim.Framework.Console"/> | 1218 | <Reference name="OpenSim.Framework.Console"/> |
1182 | <Reference name="OpenSim.Region.Terrain.BasicTerrain"/> | 1219 | <Reference name="OpenSim.Region.Terrain.BasicTerrain"/> |
1183 | <Reference name="Nini.dll" /> | 1220 | <Reference name="Nini.dll" /> |
1221 | <Reference name="log4net"/> | ||
1184 | 1222 | ||
1185 | <Files> | 1223 | <Files> |
1186 | <Match pattern="*.cs" recurse="true"/> | 1224 | <Match pattern="*.cs" recurse="true"/> |
1187 | </Files> | 1225 | </Files> |
1188 | </Project> | 1226 | </Project> |
1189 | 1227 | ||
1190 | |||
1191 | |||
1192 | <Project name="OpenSim.Region.ScriptEngine.DotNetEngine" path="OpenSim/Region/ScriptEngine/DotNetEngine" type="Library"> | 1228 | <Project name="OpenSim.Region.ScriptEngine.DotNetEngine" path="OpenSim/Region/ScriptEngine/DotNetEngine" type="Library"> |
1193 | <Configuration name="Debug"> | 1229 | <Configuration name="Debug"> |
1194 | <Options> | 1230 | <Options> |
@@ -1214,9 +1250,11 @@ | |||
1214 | <Reference name="OpenSim.Region.Environment" /> | 1250 | <Reference name="OpenSim.Region.Environment" /> |
1215 | <Reference name="OpenSim.Region.ScriptEngine.Common"/> | 1251 | <Reference name="OpenSim.Region.ScriptEngine.Common"/> |
1216 | <Reference name="OpenSim.Region.Terrain.BasicTerrain"/> | 1252 | <Reference name="OpenSim.Region.Terrain.BasicTerrain"/> |
1217 | <Reference name="Microsoft.JScript"/> | 1253 | <Reference name="Microsoft.JScript"/> |
1218 | <Reference name="Axiom.MathLib.dll" localCopy="false"/> | 1254 | <Reference name="Axiom.MathLib.dll" localCopy="false"/> |
1219 | <Reference name="Nini.dll" /> | 1255 | <Reference name="Nini.dll" /> |
1256 | <Reference name="log4net"/> | ||
1257 | |||
1220 | <Files> | 1258 | <Files> |
1221 | <Match pattern="*.cs" recurse="true"/> | 1259 | <Match pattern="*.cs" recurse="true"/> |
1222 | </Files> | 1260 | </Files> |
@@ -1249,6 +1287,8 @@ | |||
1249 | <Reference name="OpenSim.Region.Terrain.BasicTerrain"/> | 1287 | <Reference name="OpenSim.Region.Terrain.BasicTerrain"/> |
1250 | <Reference name="Axiom.MathLib.dll" localCopy="false"/> | 1288 | <Reference name="Axiom.MathLib.dll" localCopy="false"/> |
1251 | <Reference name="Nini.dll" /> | 1289 | <Reference name="Nini.dll" /> |
1290 | <Reference name="log4net"/> | ||
1291 | |||
1252 | <Files> | 1292 | <Files> |
1253 | <Match pattern="*.cs" recurse="true"/> | 1293 | <Match pattern="*.cs" recurse="true"/> |
1254 | </Files> | 1294 | </Files> |
@@ -1286,6 +1326,7 @@ | |||
1286 | <Reference name="Axiom.MathLib.dll" localCopy="false"/> | 1326 | <Reference name="Axiom.MathLib.dll" localCopy="false"/> |
1287 | <Reference name="XMLRPC.dll"/> | 1327 | <Reference name="XMLRPC.dll"/> |
1288 | <Reference name="Nini.dll" /> | 1328 | <Reference name="Nini.dll" /> |
1329 | <Reference name="log4net"/> | ||
1289 | 1330 | ||
1290 | <Files> | 1331 | <Files> |
1291 | <Match pattern="*.cs" recurse="true"/> | 1332 | <Match pattern="*.cs" recurse="true"/> |
@@ -1318,6 +1359,7 @@ | |||
1318 | <Reference name="OpenSim.Region.ScriptEngine.Common"/> | 1359 | <Reference name="OpenSim.Region.ScriptEngine.Common"/> |
1319 | <Reference name="OpenSim.Region.ScriptEngine.DotNetEngine"/> | 1360 | <Reference name="OpenSim.Region.ScriptEngine.DotNetEngine"/> |
1320 | <Reference name="Nini.dll" /> | 1361 | <Reference name="Nini.dll" /> |
1362 | <Reference name="log4net"/> | ||
1321 | <!-- Reference name="OpenSim.Grid.ScriptServer"/ --> | 1363 | <!-- Reference name="OpenSim.Grid.ScriptServer"/ --> |
1322 | 1364 | ||
1323 | <Files> | 1365 | <Files> |
@@ -1326,7 +1368,7 @@ | |||
1326 | </Project> | 1368 | </Project> |
1327 | 1369 | ||
1328 | <!-- Tests --> | 1370 | <!-- Tests --> |
1329 | <Project name="OpenSim.Test.UserServer.Stress" path="OpenSim/Tests/UserServer/Stress" type="Exe"> | 1371 | <Project name="OpenSim.Tests.UserServer.Stress" path="OpenSim/Tests/UserServer/Stress" type="Exe"> |
1330 | <Configuration name="Debug"> | 1372 | <Configuration name="Debug"> |
1331 | <Options> | 1373 | <Options> |
1332 | <OutputPath>../../../../bin/tests/stress</OutputPath> | 1374 | <OutputPath>../../../../bin/tests/stress</OutputPath> |
@@ -1338,14 +1380,14 @@ | |||
1338 | </Options> | 1380 | </Options> |
1339 | </Configuration> | 1381 | </Configuration> |
1340 | 1382 | ||
1341 | <ReferencePath>../../../../bin/tests/stress</ReferencePath> | 1383 | <ReferencePath>../../../../bin</ReferencePath> |
1342 | <Reference name="System" localCopy="false"/> | 1384 | <Reference name="System" localCopy="false"/> |
1385 | <Reference name="log4net"/> | ||
1343 | <Files> | 1386 | <Files> |
1344 | <Match pattern="*.cs" recurse="true"/> | 1387 | <Match pattern="*.cs" recurse="true"/> |
1345 | </Files> | 1388 | </Files> |
1346 | </Project> | 1389 | </Project> |
1347 | 1390 | ||
1348 | |||
1349 | <!-- Tools --> | 1391 | <!-- Tools --> |
1350 | <Project name="OpenSimExport" path="OpenSim/Tools/Export" type="Exe"> | 1392 | <Project name="OpenSimExport" path="OpenSim/Tools/Export" type="Exe"> |
1351 | <Configuration name="Debug"> | 1393 | <Configuration name="Debug"> |
@@ -1381,14 +1423,13 @@ | |||
1381 | <Reference name="XMLRPC.dll"/> | 1423 | <Reference name="XMLRPC.dll"/> |
1382 | <Reference name="OpenSim.Region.Communications.Local"/> | 1424 | <Reference name="OpenSim.Region.Communications.Local"/> |
1383 | <Reference name="Nini.dll" /> | 1425 | <Reference name="Nini.dll" /> |
1426 | <Reference name="log4net"/> | ||
1384 | <Files> | 1427 | <Files> |
1385 | <Match pattern="*.cs" recurse="true"/> | 1428 | <Match pattern="*.cs" recurse="true"/> |
1386 | </Files> | 1429 | </Files> |
1387 | </Project> | 1430 | </Project> |
1388 | |||
1389 | </Solution> | 1431 | </Solution> |
1390 | 1432 | ||
1391 | |||
1392 | <!-- Prebuild tool --> | 1433 | <!-- Prebuild tool --> |
1393 | <Solution name="Prebuild" path="Prebuild/" > | 1434 | <Solution name="Prebuild" path="Prebuild/" > |
1394 | <Configuration name="Debug"> | 1435 | <Configuration name="Debug"> |
@@ -1409,6 +1450,7 @@ | |||
1409 | <SuppressWarnings>1595</SuppressWarnings> | 1450 | <SuppressWarnings>1595</SuppressWarnings> |
1410 | </Options> | 1451 | </Options> |
1411 | </Configuration> | 1452 | </Configuration> |
1453 | |||
1412 | <Project name="Prebuild" path="src/" language="C#" assemblyName="Prebuild" icon="App.ico" type="Exe" rootNamespace="Prebuild" startupObject="Prebuild.Prebuild"> | 1454 | <Project name="Prebuild" path="src/" language="C#" assemblyName="Prebuild" icon="App.ico" type="Exe" rootNamespace="Prebuild" startupObject="Prebuild.Prebuild"> |
1413 | <Configuration name="Debug"> | 1455 | <Configuration name="Debug"> |
1414 | <Options> | 1456 | <Options> |
@@ -1441,7 +1483,5 @@ | |||
1441 | </Files> | 1483 | </Files> |
1442 | </Project> | 1484 | </Project> |
1443 | 1485 | ||
1444 | |||
1445 | |||
1446 | </Solution> | 1486 | </Solution> |
1447 | </Prebuild> | 1487 | </Prebuild> |