aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
diff options
context:
space:
mode:
authorJeff Ames2008-02-05 19:44:27 +0000
committerJeff Ames2008-02-05 19:44:27 +0000
commit6ed5283bc06a62f38eb517e67b975832b603bf61 (patch)
treee5f635018789b73a99ddeca0883a68368fa5eece /OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs
parentCut down on the number of packets sent during terraforming. Terraforming shou... (diff)
downloadopensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.zip
opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.gz
opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.bz2
opensim-SC-6ed5283bc06a62f38eb517e67b975832b603bf61.tar.xz
Converted logging to use log4net.
Changed LogBase to ConsoleBase, which handles console I/O. This is mostly an in-place conversion, so lots of refactoring can still be done.
Diffstat (limited to 'OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs')
-rw-r--r--OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs18
1 files changed, 10 insertions, 8 deletions
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)