aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMW2007-04-26 17:50:25 +0000
committerMW2007-04-26 17:50:25 +0000
commit14a4ff308190af61783f1c4c686bcfc3dfa07a4f (patch)
tree70e9c899bfcd1e04399771ff25a89bebdf866867
parentAt last: avatar-template.dat is no more (diff)
downloadopensim-SC_OLD-14a4ff308190af61783f1c4c686bcfc3dfa07a4f.zip
opensim-SC_OLD-14a4ff308190af61783f1c4c686bcfc3dfa07a4f.tar.gz
opensim-SC_OLD-14a4ff308190af61783f1c4c686bcfc3dfa07a4f.tar.bz2
opensim-SC_OLD-14a4ff308190af61783f1c4c686bcfc3dfa07a4f.tar.xz
added just what opensim needs...yet another command line option: -noverbose . cut down on the system console output (should really be stopping it all but not all output is going through OpenSim.Framework.Console)
Diffstat (limited to '')
-rw-r--r--OpenGridServices.GridServer/Main.cs8
-rw-r--r--OpenGridServices.UserServer/Main.cs2
-rw-r--r--OpenSim.Framework.Console/ConsoleBase.cs11
-rw-r--r--OpenSim.RegionServer/OpenSimMain.cs4
-rw-r--r--OpenSim/Application.cs7
5 files changed, 22 insertions, 10 deletions
diff --git a/OpenGridServices.GridServer/Main.cs b/OpenGridServices.GridServer/Main.cs
index 55e2b00..69cba9c 100644
--- a/OpenGridServices.GridServer/Main.cs
+++ b/OpenGridServices.GridServer/Main.cs
@@ -80,7 +80,7 @@ namespace OpenGridServices.GridServer
80 80
81 private OpenGrid_Main() 81 private OpenGrid_Main()
82 { 82 {
83 m_console = new ConsoleBase("opengrid-gridserver-console.log", "OpenGrid", this); 83 m_console = new ConsoleBase("opengrid-gridserver-console.log", "OpenGrid", this, false);
84 MainConsole.Instance = m_console; 84 MainConsole.Instance = m_console;
85 } 85 }
86 86
@@ -101,9 +101,9 @@ namespace OpenGridServices.GridServer
101 101
102 httpServer.AddRestHandler("GET", "/sims/", m_simProfileManager.RestGetSimMethod); 102 httpServer.AddRestHandler("GET", "/sims/", m_simProfileManager.RestGetSimMethod);
103 httpServer.AddRestHandler("POST", "/sims/", m_simProfileManager.RestSetSimMethod); 103 httpServer.AddRestHandler("POST", "/sims/", m_simProfileManager.RestSetSimMethod);
104 httpServer.AddRestHandler("GET", "/regions/", m_simProfileManager.RestGetRegionMethod); 104 httpServer.AddRestHandler("GET", "/regions/", m_simProfileManager.RestGetRegionMethod);
105 httpServer.AddRestHandler("POST", "/regions/", m_simProfileManager.RestSetRegionMethod); 105 httpServer.AddRestHandler("POST", "/regions/", m_simProfileManager.RestSetRegionMethod);
106 106
107 107
108 // lbsa71 : This code snippet taken from old http server. 108 // lbsa71 : This code snippet taken from old http server.
109 // I have no idea what this was supposed to do - looks like an infinite recursion to me. 109 // I have no idea what this was supposed to do - looks like an infinite recursion to me.
diff --git a/OpenGridServices.UserServer/Main.cs b/OpenGridServices.UserServer/Main.cs
index c348a74..a0373f4 100644
--- a/OpenGridServices.UserServer/Main.cs
+++ b/OpenGridServices.UserServer/Main.cs
@@ -68,7 +68,7 @@ namespace OpenGridServices.UserServer
68 68
69 private OpenUser_Main() 69 private OpenUser_Main()
70 { 70 {
71 m_console = new ConsoleBase("opengrid-userserver-console.log", "OpenUser", this); 71 m_console = new ConsoleBase("opengrid-userserver-console.log", "OpenUser", this , false);
72 MainConsole.Instance = m_console; 72 MainConsole.Instance = m_console;
73 } 73 }
74 74
diff --git a/OpenSim.Framework.Console/ConsoleBase.cs b/OpenSim.Framework.Console/ConsoleBase.cs
index 89c751f..39d2b28 100644
--- a/OpenSim.Framework.Console/ConsoleBase.cs
+++ b/OpenSim.Framework.Console/ConsoleBase.cs
@@ -8,6 +8,7 @@ namespace OpenSim.Framework.Console
8 StreamWriter Log; 8 StreamWriter Log;
9 public conscmd_callback cmdparser; 9 public conscmd_callback cmdparser;
10 public string componentname; 10 public string componentname;
11 private bool disableOutput;
11 12
12 // STUPID HACK ALERT!!!! STUPID HACK ALERT!!!!! 13 // STUPID HACK ALERT!!!! STUPID HACK ALERT!!!!!
13 // constype - the type of console to use (see enum ConsoleType) 14 // constype - the type of console to use (see enum ConsoleType)
@@ -21,11 +22,11 @@ namespace OpenSim.Framework.Console
21 // componentname - which component of the OGS system? (user, asset etc) 22 // componentname - which component of the OGS system? (user, asset etc)
22 // cmdparser - a reference to a conscmd_callback object 23 // cmdparser - a reference to a conscmd_callback object
23 24
24 public ConsoleBase(string LogFile, string componentname, conscmd_callback cmdparser) 25 public ConsoleBase(string LogFile, string componentname, conscmd_callback cmdparser, bool disableSystemConsole )
25 { 26 {
26 this.componentname = componentname; 27 this.componentname = componentname;
27 this.cmdparser = cmdparser; 28 this.cmdparser = cmdparser;
28 29 this.disableOutput = disableSystemConsole;
29 System.Console.WriteLine("ServerConsole.cs - creating new local console"); 30 System.Console.WriteLine("ServerConsole.cs - creating new local console");
30 System.Console.WriteLine("Logs will be saved to current directory in " + LogFile); 31 System.Console.WriteLine("Logs will be saved to current directory in " + LogFile);
31 Log = File.AppendText(LogFile); 32 Log = File.AppendText(LogFile);
@@ -42,14 +43,20 @@ namespace OpenSim.Framework.Console
42 public void Write(string format, params object[] args) 43 public void Write(string format, params object[] args)
43 { 44 {
44 Log.Write(format, args); 45 Log.Write(format, args);
46 if(!disableOutput)
47 {
45 System.Console.Write(format, args); 48 System.Console.Write(format, args);
49 }
46 return; 50 return;
47 } 51 }
48 52
49 public void WriteLine(string format, params object[] args) 53 public void WriteLine(string format, params object[] args)
50 { 54 {
51 Log.WriteLine(format, args); 55 Log.WriteLine(format, args);
56 if(!disableOutput)
57 {
52 System.Console.WriteLine(format, args); 58 System.Console.WriteLine(format, args);
59 }
53 return; 60 return;
54 } 61 }
55 62
diff --git a/OpenSim.RegionServer/OpenSimMain.cs b/OpenSim.RegionServer/OpenSimMain.cs
index 0ced749..4375f74 100644
--- a/OpenSim.RegionServer/OpenSimMain.cs
+++ b/OpenSim.RegionServer/OpenSimMain.cs
@@ -90,14 +90,14 @@ namespace OpenSim
90 90
91 protected ConsoleBase m_console; 91 protected ConsoleBase m_console;
92 92
93 public OpenSimMain(bool sandBoxMode, bool startLoginServer, string physicsEngine, bool useConfigFile) 93 public OpenSimMain(bool sandBoxMode, bool startLoginServer, string physicsEngine, bool useConfigFile, bool verbose)
94 { 94 {
95 this.configFileSetup = useConfigFile; 95 this.configFileSetup = useConfigFile;
96 m_sandbox = sandBoxMode; 96 m_sandbox = sandBoxMode;
97 m_loginserver = startLoginServer; 97 m_loginserver = startLoginServer;
98 m_physicsEngine = physicsEngine; 98 m_physicsEngine = physicsEngine;
99 99
100 m_console = new ConsoleBase("region-console.log", "Region", this); 100 m_console = new ConsoleBase("region-console.log", "Region", this, verbose);
101 OpenSim.Framework.Console.MainConsole.Instance = m_console; 101 OpenSim.Framework.Console.MainConsole.Instance = m_console;
102 } 102 }
103 103
diff --git a/OpenSim/Application.cs b/OpenSim/Application.cs
index 56fcf53..6adc540 100644
--- a/OpenSim/Application.cs
+++ b/OpenSim/Application.cs
@@ -21,6 +21,7 @@ namespace OpenSim
21 bool userAccounts = false; 21 bool userAccounts = false;
22 bool gridLocalAsset = false; 22 bool gridLocalAsset = false;
23 bool useConfigFile = false; 23 bool useConfigFile = false;
24 bool noverbose = false;
24 25
25 for (int i = 0; i < args.Length; i++) 26 for (int i = 0; i < args.Length; i++)
26 { 27 {
@@ -55,9 +56,13 @@ namespace OpenSim
55 { 56 {
56 useConfigFile = true; 57 useConfigFile = true;
57 } 58 }
59 if (args[i] == "-noverbose")
60 {
61 noverbose = true;
62 }
58 } 63 }
59 64
60 OpenSimMain sim = new OpenSimMain( sandBoxMode, startLoginServer, physicsEngine, useConfigFile); 65 OpenSimMain sim = new OpenSimMain( sandBoxMode, startLoginServer, physicsEngine, useConfigFile, noverbose);
61 // OpenSimRoot.Instance.Application = sim; 66 // OpenSimRoot.Instance.Application = sim;
62 sim.m_sandbox = sandBoxMode; 67 sim.m_sandbox = sandBoxMode;
63 sim.user_accounts = userAccounts; 68 sim.user_accounts = userAccounts;