aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim.Framework.Console/ConsoleBase.cs11
-rw-r--r--OpenSim.RegionServer/OpenSimMain.cs4
-rw-r--r--OpenSim/Application.cs7
3 files changed, 17 insertions, 5 deletions
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;