aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-05-12 13:39:46 +0000
committerJustin Clarke Casey2008-05-12 13:39:46 +0000
commitb4d128c811cd5b0344cc2cae1663e17f2951d183 (patch)
treef4c973c7819ee0d1f2ffeec17ee42e240f633439 /OpenSim
parentThanks Melanie for a patch to stop sending unnecessary animation updates (bug... (diff)
downloadopensim-SC_OLD-b4d128c811cd5b0344cc2cae1663e17f2951d183.zip
opensim-SC_OLD-b4d128c811cd5b0344cc2cae1663e17f2951d183.tar.gz
opensim-SC_OLD-b4d128c811cd5b0344cc2cae1663e17f2951d183.tar.bz2
opensim-SC_OLD-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.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Framework/Console/ConsoleBase.cs2
-rw-r--r--OpenSim/Framework/Servers/BaseOpenSimServer.cs29
2 files changed, 23 insertions, 8 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}