mirror of
https://github.com/opensim/opensim.git
synced 2026-08-04 08:06:27 +08:00
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)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user