From 3cbc1e011d8abcfefacc0c72429dd01656f49ef2 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Tue, 24 Jul 2007 03:59:32 +0000 Subject: * Reduced a significant number of compiler warnings (back down to 9 for all projects combined, all 'never used' things) --- OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs | 2 +- OpenSim/Framework/Console/LogBase.cs | 4 ++-- OpenSim/Framework/Servers/BaseHttpServer.cs | 6 +++--- OpenSim/Framework/UserManager/LoginResponse.cs | 4 ++-- OpenSim/Grid/GridServer/Main.cs | 1 - OpenSim/Grid/UserServer/Main.cs | 1 - OpenSim/Region/Environment/Scenes/SceneBase.cs | 2 +- OpenSim/Region/Examples/SimpleApp/Program.cs | 2 +- OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs | 4 ++-- 9 files changed, 12 insertions(+), 14 deletions(-) diff --git a/OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs b/OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs index c7d2c9c..d72c40f 100644 --- a/OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs +++ b/OpenSim/Framework/Configuration/HTTP/HTTPConfiguration.cs @@ -54,7 +54,7 @@ namespace OpenSim.Framework.Configuration.HTTP while (count > 0); LoadDataFromString(sb.ToString()); } - catch (Exception e) + catch (WebException) { Console.MainLog.Instance.Warn("Unable to connect to remote configuration file (" + remoteConfigSettings.baseConfigURL + configFileName + "). Creating local file instead."); xmlConfig.SetFileName(configFileName); diff --git a/OpenSim/Framework/Console/LogBase.cs b/OpenSim/Framework/Console/LogBase.cs index 60c77fe..f2b2720 100644 --- a/OpenSim/Framework/Console/LogBase.cs +++ b/OpenSim/Framework/Console/LogBase.cs @@ -344,7 +344,7 @@ namespace OpenSim.Framework.Console { // FIXME: Needs to be better abstracted Log.WriteLine(prompt); - this.Write(prompt); + this.Notice(prompt); ConsoleColor oldfg = System.Console.ForegroundColor; System.Console.ForegroundColor = System.Console.BackgroundColor; string temp = System.Console.ReadLine(); @@ -355,7 +355,7 @@ namespace OpenSim.Framework.Console // Displays a command prompt and waits for the user to enter a string, then returns that string public string CmdPrompt(string prompt) { - this.Write(String.Format("{0}: ", prompt)); + this.Notice(String.Format("{0}: ", prompt)); return this.ReadLine(); } diff --git a/OpenSim/Framework/Servers/BaseHttpServer.cs b/OpenSim/Framework/Servers/BaseHttpServer.cs index 4b3b3de..d0784f3 100644 --- a/OpenSim/Framework/Servers/BaseHttpServer.cs +++ b/OpenSim/Framework/Servers/BaseHttpServer.cs @@ -185,7 +185,7 @@ namespace OpenSim.Framework.Servers public void Start() { - MainLog.Instance.WriteLine(LogPriority.LOW, "BaseHttpServer.cs: Starting up HTTP Server"); + MainLog.Instance.Verbose("HTTPD", "BaseHttpServer.cs: Starting up HTTP Server"); m_workerThread = new Thread(new ThreadStart(StartHTTP)); m_workerThread.IsBackground = true; @@ -196,7 +196,7 @@ namespace OpenSim.Framework.Servers { try { - MainLog.Instance.WriteLine(LogPriority.LOW, "BaseHttpServer.cs: StartHTTP() - Spawned main thread OK"); + MainLog.Instance.Status("HTTPD", "BaseHttpServer.cs: StartHTTP() - Spawned main thread OK"); m_httpListener = new HttpListener(); m_httpListener.Prefixes.Add("http://+:" + m_port + "/"); @@ -211,7 +211,7 @@ namespace OpenSim.Framework.Servers } catch (Exception e) { - MainLog.Instance.WriteLine(LogPriority.MEDIUM, e.Message); + MainLog.Instance.Warn("HTTPD", "Error - " + e.Message); } } diff --git a/OpenSim/Framework/UserManager/LoginResponse.cs b/OpenSim/Framework/UserManager/LoginResponse.cs index e1fc391..4d5ec5f 100644 --- a/OpenSim/Framework/UserManager/LoginResponse.cs +++ b/OpenSim/Framework/UserManager/LoginResponse.cs @@ -257,8 +257,8 @@ namespace OpenSim.Framework.UserManagement } catch (Exception e) { - MainLog.Instance.WriteLine( - LogPriority.LOW, + MainLog.Instance.Warn( + "CLIENT", "LoginResponse: Error creating XML-RPC Response: " + e.Message ); return (this.GenerateFailureResponse("Internal Error", "Error generating Login Response", "false")); diff --git a/OpenSim/Grid/GridServer/Main.cs b/OpenSim/Grid/GridServer/Main.cs index 8353066..f9accab 100644 --- a/OpenSim/Grid/GridServer/Main.cs +++ b/OpenSim/Grid/GridServer/Main.cs @@ -43,7 +43,6 @@ namespace OpenSim.Grid.GridServer /// public class OpenGrid_Main : conscmd_callback { - private string GridDll = "OpenSim.Framework.Data.MySQL.dll"; public GridConfig Cfg; public static OpenGrid_Main thegrid; diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index a6571cf..111d40d 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs @@ -43,7 +43,6 @@ namespace OpenSim.Grid.UserServer /// public class OpenUser_Main : conscmd_callback { - private string StorageDll = "OpenSim.Framework.Data.MySQL.dll"; private UserConfig Cfg; public UserManager m_userManager; diff --git a/OpenSim/Region/Environment/Scenes/SceneBase.cs b/OpenSim/Region/Environment/Scenes/SceneBase.cs index 3c2193e..fb7624a 100644 --- a/OpenSim/Region/Environment/Scenes/SceneBase.cs +++ b/OpenSim/Region/Environment/Scenes/SceneBase.cs @@ -145,7 +145,7 @@ namespace OpenSim.Region.Environment.Scenes } catch (Exception e) { - MainLog.Instance.WriteLine(LogPriority.HIGH, "World.cs: Close() - Failed with exception " + e.ToString()); + MainLog.Instance.Error("SCENE", "World.cs: Close() - Failed with exception " + e.ToString()); } } diff --git a/OpenSim/Region/Examples/SimpleApp/Program.cs b/OpenSim/Region/Examples/SimpleApp/Program.cs index a5bc999..a27cc0c 100644 --- a/OpenSim/Region/Examples/SimpleApp/Program.cs +++ b/OpenSim/Region/Examples/SimpleApp/Program.cs @@ -94,7 +94,7 @@ namespace SimpleApp scene.AddEntity(fileObject); } - m_log.WriteLine(LogPriority.NORMAL, "Press enter to quit."); + m_log.Notice("Press enter to quit."); m_log.ReadLine(); } diff --git a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs index cb77405..6ab4178 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsPluginManager.cs @@ -54,12 +54,12 @@ namespace OpenSim.Physics.Manager if(_plugins.ContainsKey(engineName)) { - MainLog.Instance.WriteLine(LogPriority.LOW,"creating "+engineName); + MainLog.Instance.Verbose("PHYSICS","creating "+engineName); return _plugins[engineName].GetScene(); } else { - MainLog.Instance.WriteLine(LogPriority.MEDIUM,"couldn't find physicsEngine: {0}",engineName); + MainLog.Instance.Warn("PHYSICS", "couldn't find physicsEngine: {0}", engineName); throw new ArgumentException(String.Format("couldn't find physicsEngine: {0}",engineName)); } } -- cgit v1.1