apply http://bug.opensecondlife.org/view.php?id=512 from chillken
which cleans up the verbose logicafrisby
parent
1d5ec16865
commit
32869aec47
|
@ -51,13 +51,13 @@ namespace OpenSim.Framework.Console
|
|||
StreamWriter Log;
|
||||
public conscmd_callback cmdparser;
|
||||
public string componentname;
|
||||
private bool m_silent;
|
||||
private bool m_verbose;
|
||||
|
||||
public LogBase(string LogFile, string componentname, conscmd_callback cmdparser, bool silent)
|
||||
public LogBase(string LogFile, string componentname, conscmd_callback cmdparser, bool verbose)
|
||||
{
|
||||
this.componentname = componentname;
|
||||
this.cmdparser = cmdparser;
|
||||
this.m_silent = silent;
|
||||
this.m_verbose = verbose;
|
||||
System.Console.WriteLine("Creating new local console");
|
||||
|
||||
if (String.IsNullOrEmpty(LogFile))
|
||||
|
@ -170,7 +170,7 @@ namespace OpenSim.Framework.Console
|
|||
/// <param name="args">WriteLine-style message arguments</param>
|
||||
public void Verbose(string format, params object[] args)
|
||||
{
|
||||
if (!m_silent)
|
||||
if (m_verbose)
|
||||
{
|
||||
WriteNewLine(ConsoleColor.Gray, format, args);
|
||||
return;
|
||||
|
@ -185,7 +185,7 @@ namespace OpenSim.Framework.Console
|
|||
/// <param name="args">WriteLine-style message arguments</param>
|
||||
public void Verbose(string sender, string format, params object[] args)
|
||||
{
|
||||
if (!m_silent)
|
||||
if (m_verbose)
|
||||
{
|
||||
WritePrefixLine(DeriveColor(sender), sender);
|
||||
WriteNewLine(ConsoleColor.Gray, format, args);
|
||||
|
|
|
@ -86,7 +86,7 @@ namespace OpenSim.Grid.AssetServer
|
|||
{
|
||||
Directory.CreateDirectory(Util.logDir());
|
||||
}
|
||||
m_console = new LogBase((Path.Combine(Util.logDir(),"opengrid-AssetServer-console.log")), "OpenAsset", this, false);
|
||||
m_console = new LogBase((Path.Combine(Util.logDir(),"opengrid-AssetServer-console.log")), "OpenAsset", this, true);
|
||||
MainLog.Instance = m_console;
|
||||
}
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ namespace OpenSim.Grid.GridServer
|
|||
{
|
||||
Directory.CreateDirectory(Util.logDir());
|
||||
}
|
||||
m_console = new LogBase((Path.Combine(Util.logDir(),"opengrid-gridserver-console.log")), "OpenGrid", this, false);
|
||||
m_console = new LogBase((Path.Combine(Util.logDir(),"opengrid-gridserver-console.log")), "OpenGrid", this, true);
|
||||
MainLog.Instance = m_console;
|
||||
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ namespace OpenSim.Grid.ScriptServer
|
|||
Directory.CreateDirectory(Util.logDir());
|
||||
}
|
||||
|
||||
return new LogBase((Path.Combine(Util.logDir(), m_logFilename)), "Region", this, false);
|
||||
return new LogBase((Path.Combine(Util.logDir(), m_logFilename)), "Region", this, true);
|
||||
}
|
||||
|
||||
public void RunCmd(string command, string[] cmdparams)
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace OpenSim.Grid.UserServer
|
|||
{
|
||||
Directory.CreateDirectory(Util.logDir());
|
||||
}
|
||||
m_console = new LogBase((Path.Combine(Util.logDir(),"opengrid-userserver-console.log")), "OpenUser", this , false);
|
||||
m_console = new LogBase((Path.Combine(Util.logDir(), "opengrid-userserver-console.log")), "OpenUser", this, true);
|
||||
MainLog.Instance = m_console;
|
||||
}
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ namespace OpenSim
|
|||
configSource.AddSwitch("Startup", "inifile");
|
||||
configSource.AddSwitch("Startup", "gridmode");
|
||||
configSource.AddSwitch("Startup", "physics");
|
||||
configSource.AddSwitch("Startup", "noverbose");
|
||||
configSource.AddSwitch("Startup", "verbose");
|
||||
configSource.AddSwitch("Startup", "useexecutepath");
|
||||
|
||||
OpenSimMain sim = new OpenSimMain(configSource);
|
||||
|
|
|
@ -74,7 +74,7 @@ namespace OpenSim
|
|||
protected List<UDPServer> m_udpServers = new List<UDPServer>();
|
||||
protected List<RegionInfo> m_regionData = new List<RegionInfo>();
|
||||
|
||||
private bool m_silent;
|
||||
private bool m_verbose;
|
||||
private readonly string m_logFilename = ("region-console.log");
|
||||
private bool m_permissions = false;
|
||||
|
||||
|
@ -122,7 +122,7 @@ namespace OpenSim
|
|||
m_networkServersInfo = new NetworkServersInfo();
|
||||
m_sandbox = !m_config.Configs["Startup"].GetBoolean("gridmode", false);
|
||||
m_physicsEngine = m_config.Configs["Startup"].GetString("physics", "basicphysics");
|
||||
m_silent = m_config.Configs["Startup"].GetBoolean("noverbose", false);
|
||||
m_verbose = m_config.Configs["Startup"].GetBoolean("verbose", true);
|
||||
m_permissions = m_config.Configs["Startup"].GetBoolean("serverside_object_permissions", false);
|
||||
|
||||
m_storageDLL = m_config.Configs["Startup"].GetString("storage_plugin", "OpenSim.DataStore.NullStorage.dll");
|
||||
|
@ -319,7 +319,7 @@ namespace OpenSim
|
|||
Directory.CreateDirectory(Util.logDir());
|
||||
}
|
||||
|
||||
return new LogBase((Path.Combine(Util.logDir(), m_logFilename)), "Region", this, m_silent);
|
||||
return new LogBase((Path.Combine(Util.logDir(), m_logFilename)), "Region", this, m_verbose);
|
||||
}
|
||||
|
||||
# region Setup methods
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace SimpleApp
|
|||
|
||||
protected override LogBase CreateLog()
|
||||
{
|
||||
return new LogBase(null, "SimpleApp", this, false);
|
||||
return new LogBase(null, "SimpleApp", this, true);
|
||||
}
|
||||
|
||||
protected override void Initialize()
|
||||
|
|
|
@ -55,7 +55,7 @@ namespace OpenSim.Test.Inventory
|
|||
|
||||
_agent_1_id = LLUUID.Random();
|
||||
|
||||
MainLog.Instance = new LogBase("UnitTest.log", "TEST", null, true);
|
||||
MainLog.Instance = new LogBase("UnitTest.log", "TEST", null, false);
|
||||
// _dbPlugin = new SQLiteInventoryStore();
|
||||
_dbPlugin = new MySQLInventoryData();
|
||||
_dbPlugin.Initialise();
|
||||
|
|
Loading…
Reference in New Issue