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)
parent
a7c374ac51
commit
14a4ff3081
|
@ -80,7 +80,7 @@ namespace OpenGridServices.GridServer
|
|||
|
||||
private OpenGrid_Main()
|
||||
{
|
||||
m_console = new ConsoleBase("opengrid-gridserver-console.log", "OpenGrid", this);
|
||||
m_console = new ConsoleBase("opengrid-gridserver-console.log", "OpenGrid", this, false);
|
||||
MainConsole.Instance = m_console;
|
||||
}
|
||||
|
||||
|
@ -101,9 +101,9 @@ namespace OpenGridServices.GridServer
|
|||
|
||||
httpServer.AddRestHandler("GET", "/sims/", m_simProfileManager.RestGetSimMethod);
|
||||
httpServer.AddRestHandler("POST", "/sims/", m_simProfileManager.RestSetSimMethod);
|
||||
httpServer.AddRestHandler("GET", "/regions/", m_simProfileManager.RestGetRegionMethod);
|
||||
httpServer.AddRestHandler("POST", "/regions/", m_simProfileManager.RestSetRegionMethod);
|
||||
|
||||
httpServer.AddRestHandler("GET", "/regions/", m_simProfileManager.RestGetRegionMethod);
|
||||
httpServer.AddRestHandler("POST", "/regions/", m_simProfileManager.RestSetRegionMethod);
|
||||
|
||||
|
||||
// lbsa71 : This code snippet taken from old http server.
|
||||
// I have no idea what this was supposed to do - looks like an infinite recursion to me.
|
||||
|
|
|
@ -68,7 +68,7 @@ namespace OpenGridServices.UserServer
|
|||
|
||||
private OpenUser_Main()
|
||||
{
|
||||
m_console = new ConsoleBase("opengrid-userserver-console.log", "OpenUser", this);
|
||||
m_console = new ConsoleBase("opengrid-userserver-console.log", "OpenUser", this , false);
|
||||
MainConsole.Instance = m_console;
|
||||
}
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ namespace OpenSim.Framework.Console
|
|||
StreamWriter Log;
|
||||
public conscmd_callback cmdparser;
|
||||
public string componentname;
|
||||
private bool disableOutput;
|
||||
|
||||
// STUPID HACK ALERT!!!! STUPID HACK ALERT!!!!!
|
||||
// constype - the type of console to use (see enum ConsoleType)
|
||||
|
@ -21,11 +22,11 @@ namespace OpenSim.Framework.Console
|
|||
// componentname - which component of the OGS system? (user, asset etc)
|
||||
// cmdparser - a reference to a conscmd_callback object
|
||||
|
||||
public ConsoleBase(string LogFile, string componentname, conscmd_callback cmdparser)
|
||||
public ConsoleBase(string LogFile, string componentname, conscmd_callback cmdparser, bool disableSystemConsole )
|
||||
{
|
||||
this.componentname = componentname;
|
||||
this.cmdparser = cmdparser;
|
||||
|
||||
this.disableOutput = disableSystemConsole;
|
||||
System.Console.WriteLine("ServerConsole.cs - creating new local console");
|
||||
System.Console.WriteLine("Logs will be saved to current directory in " + LogFile);
|
||||
Log = File.AppendText(LogFile);
|
||||
|
@ -42,14 +43,20 @@ namespace OpenSim.Framework.Console
|
|||
public void Write(string format, params object[] args)
|
||||
{
|
||||
Log.Write(format, args);
|
||||
if(!disableOutput)
|
||||
{
|
||||
System.Console.Write(format, args);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
public void WriteLine(string format, params object[] args)
|
||||
{
|
||||
Log.WriteLine(format, args);
|
||||
if(!disableOutput)
|
||||
{
|
||||
System.Console.WriteLine(format, args);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -90,14 +90,14 @@ namespace OpenSim
|
|||
|
||||
protected ConsoleBase m_console;
|
||||
|
||||
public OpenSimMain(bool sandBoxMode, bool startLoginServer, string physicsEngine, bool useConfigFile)
|
||||
public OpenSimMain(bool sandBoxMode, bool startLoginServer, string physicsEngine, bool useConfigFile, bool verbose)
|
||||
{
|
||||
this.configFileSetup = useConfigFile;
|
||||
m_sandbox = sandBoxMode;
|
||||
m_loginserver = startLoginServer;
|
||||
m_physicsEngine = physicsEngine;
|
||||
|
||||
m_console = new ConsoleBase("region-console.log", "Region", this);
|
||||
m_console = new ConsoleBase("region-console.log", "Region", this, verbose);
|
||||
OpenSim.Framework.Console.MainConsole.Instance = m_console;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@ namespace OpenSim
|
|||
bool userAccounts = false;
|
||||
bool gridLocalAsset = false;
|
||||
bool useConfigFile = false;
|
||||
bool noverbose = false;
|
||||
|
||||
for (int i = 0; i < args.Length; i++)
|
||||
{
|
||||
|
@ -55,9 +56,13 @@ namespace OpenSim
|
|||
{
|
||||
useConfigFile = true;
|
||||
}
|
||||
if (args[i] == "-noverbose")
|
||||
{
|
||||
noverbose = true;
|
||||
}
|
||||
}
|
||||
|
||||
OpenSimMain sim = new OpenSimMain( sandBoxMode, startLoginServer, physicsEngine, useConfigFile);
|
||||
OpenSimMain sim = new OpenSimMain( sandBoxMode, startLoginServer, physicsEngine, useConfigFile, noverbose);
|
||||
// OpenSimRoot.Instance.Application = sim;
|
||||
sim.m_sandbox = sandBoxMode;
|
||||
sim.user_accounts = userAccounts;
|
||||
|
|
Loading…
Reference in New Issue