diff options
author | Justin Clarke Casey | 2008-05-12 13:39:46 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-05-12 13:39:46 +0000 |
commit | b4d128c811cd5b0344cc2cae1663e17f2951d183 (patch) | |
tree | f4c973c7819ee0d1f2ffeec17ee42e240f633439 | |
parent | Thanks Melanie for a patch to stop sending unnecessary animation updates (bug... (diff) | |
download | opensim-SC-b4d128c811cd5b0344cc2cae1663e17f2951d183.zip opensim-SC-b4d128c811cd5b0344cc2cae1663e17f2951d183.tar.gz opensim-SC-b4d128c811cd5b0344cc2cae1663e17f2951d183.tar.bz2 opensim-SC-b4d128c811cd5b0344cc2cae1663e17f2951d183.tar.xz |
From: Alan M Webb <awebb@vnet.ibm.com>
This patch just tightens up console handling in BasOpenSimServer
and removes (or redirects) a couple of messages that were being issued
using Console.Writeline.
-rw-r--r-- | OpenSim/Framework/Console/ConsoleBase.cs | 2 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/BaseOpenSimServer.cs | 29 | ||||
-rw-r--r-- | ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs | 4 |
3 files changed, 25 insertions, 10 deletions
diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs index b336545..79fe1d4 100644 --- a/OpenSim/Framework/Console/ConsoleBase.cs +++ b/OpenSim/Framework/Console/ConsoleBase.cs | |||
@@ -49,8 +49,6 @@ namespace OpenSim.Framework.Console | |||
49 | m_componentName = componentname; | 49 | m_componentName = componentname; |
50 | m_cmdParser = cmdparser; | 50 | m_cmdParser = cmdparser; |
51 | 51 | ||
52 | System.Console.WriteLine("Creating new local console"); | ||
53 | |||
54 | m_log.Info("[" + m_componentName + "]: Started at " + DateTime.Now.ToString()); | 52 | m_log.Info("[" + m_componentName + "]: Started at " + DateTime.Now.ToString()); |
55 | } | 53 | } |
56 | 54 | ||
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index af25ef4..b8ad83a 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs | |||
@@ -54,7 +54,10 @@ namespace OpenSim.Framework.Servers | |||
54 | /// </summary> | 54 | /// </summary> |
55 | public virtual void Shutdown() | 55 | public virtual void Shutdown() |
56 | { | 56 | { |
57 | m_console.Close(); | 57 | if(m_console != null) |
58 | { | ||
59 | m_console.Close(); | ||
60 | } | ||
58 | Environment.Exit(0); | 61 | Environment.Exit(0); |
59 | } | 62 | } |
60 | 63 | ||
@@ -68,9 +71,9 @@ namespace OpenSim.Framework.Servers | |||
68 | switch (command) | 71 | switch (command) |
69 | { | 72 | { |
70 | case "help": | 73 | case "help": |
71 | m_console.Notice("quit - equivalent to shutdown."); | 74 | Notice("quit - equivalent to shutdown."); |
72 | m_console.Notice("show uptime - show server startup and uptime."); | 75 | Notice("show uptime - show server startup and uptime."); |
73 | m_console.Notice("shutdown - shutdown the server.\n"); | 76 | Notice("shutdown - shutdown the server.\n"); |
74 | break; | 77 | break; |
75 | 78 | ||
76 | case "show": | 79 | case "show": |
@@ -96,10 +99,24 @@ namespace OpenSim.Framework.Servers | |||
96 | switch (ShowWhat) | 99 | switch (ShowWhat) |
97 | { | 100 | { |
98 | case "uptime": | 101 | case "uptime": |
99 | m_console.Notice("Server has been running since " + m_startuptime.ToString()); | 102 | Notice("Server has been running since " + m_startuptime.DayOfWeek + ", " + m_startuptime.ToString()); |
100 | m_console.Notice("That is " + (DateTime.Now - m_startuptime).ToString()); | 103 | Notice("That is an elapsed time of " + (DateTime.Now - m_startuptime).ToString()); |
101 | break; | 104 | break; |
102 | } | 105 | } |
103 | } | 106 | } |
107 | |||
108 | /// <summary> | ||
109 | /// Console output is only possible if a console has been established. | ||
110 | /// That is something that cannot be determined within this class. So | ||
111 | /// all attempts to use the console MUST be verified. | ||
112 | /// </summary> | ||
113 | private void Notice(string msg) | ||
114 | { | ||
115 | if(m_console != null) | ||
116 | { | ||
117 | m_console.Notice(msg); | ||
118 | } | ||
119 | } | ||
120 | |||
104 | } | 121 | } |
105 | } | 122 | } |
diff --git a/ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs b/ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs index e8ae8a9..16470de 100644 --- a/ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs +++ b/ThirdParty/3Di/RegionProxy/RegionProxyPlugin.cs | |||
@@ -71,7 +71,7 @@ namespace OpenSim.ApplicationPlugins.RegionProxy | |||
71 | 71 | ||
72 | public void Initialise(OpenSimMain openSim) | 72 | public void Initialise(OpenSimMain openSim) |
73 | { | 73 | { |
74 | Console.WriteLine("Starting proxy"); | 74 | m_log.Info("Starting proxy"); |
75 | string proxyURL = openSim.ConfigSource.Configs["Network"].GetString("proxy_url", ""); | 75 | string proxyURL = openSim.ConfigSource.Configs["Network"].GetString("proxy_url", ""); |
76 | if (proxyURL.Length == 0) return; | 76 | if (proxyURL.Length == 0) return; |
77 | 77 | ||
@@ -543,4 +543,4 @@ namespace OpenSim.ApplicationPlugins.RegionProxy | |||
543 | 543 | ||
544 | #endregion | 544 | #endregion |
545 | } | 545 | } |
546 | } \ No newline at end of file | 546 | } |