mirror of
https://github.com/opensim/opensim.git
synced 2026-08-09 18:55:58 +08:00
Massive console refactor. Greatly simplify interface.
This commit is contained in:
2
OpenSim/Framework/Monitoring/ChecksManager.cs
Normal file → Executable file
2
OpenSim/Framework/Monitoring/ChecksManager.cs
Normal file → Executable file
@@ -88,7 +88,7 @@ namespace OpenSim.Framework.Monitoring
|
||||
con.Output("check categories available are:");
|
||||
|
||||
foreach (string category in RegisteredChecks.Keys)
|
||||
con.OutputFormat(" {0}", category);
|
||||
con.Output(" {0}", null, category);
|
||||
}
|
||||
// else
|
||||
// {
|
||||
|
||||
4
OpenSim/Framework/Monitoring/StatsLogger.cs
Normal file → Executable file
4
OpenSim/Framework/Monitoring/StatsLogger.cs
Normal file → Executable file
@@ -79,7 +79,7 @@ namespace OpenSim.Framework.Monitoring
|
||||
if (cmd[2] == "start")
|
||||
{
|
||||
Start();
|
||||
con.OutputFormat("Now recording all stats to file every {0}ms", m_statsLogIntervalMs);
|
||||
con.Output("Now recording all stats to file every {0}ms", null, m_statsLogIntervalMs);
|
||||
}
|
||||
else if (cmd[2] == "stop")
|
||||
{
|
||||
@@ -106,7 +106,7 @@ namespace OpenSim.Framework.Monitoring
|
||||
sw.WriteLine(line);
|
||||
}
|
||||
|
||||
MainConsole.Instance.OutputFormat("Stats saved to file {0}", path);
|
||||
MainConsole.Instance.Output("Stats saved to file {0}", null, path);
|
||||
}
|
||||
|
||||
public static void Start()
|
||||
|
||||
10
OpenSim/Framework/Monitoring/StatsManager.cs
Normal file → Executable file
10
OpenSim/Framework/Monitoring/StatsManager.cs
Normal file → Executable file
@@ -117,14 +117,14 @@ namespace OpenSim.Framework.Monitoring
|
||||
{
|
||||
con.Output("Statistic categories available are:");
|
||||
foreach (string category in RegisteredStats.Keys)
|
||||
con.OutputFormat(" {0}", category);
|
||||
con.Output(" {0}", null, category);
|
||||
}
|
||||
else
|
||||
{
|
||||
SortedDictionary<string, SortedDictionary<string, Stat>> category;
|
||||
if (!RegisteredStats.TryGetValue(categoryName, out category))
|
||||
{
|
||||
con.OutputFormat("No such category as {0}", categoryName);
|
||||
con.Output("No such category as {0}", null, categoryName);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -150,14 +150,14 @@ namespace OpenSim.Framework.Monitoring
|
||||
}
|
||||
else
|
||||
{
|
||||
con.OutputFormat(
|
||||
"No such stat {0} in {1}.{2}", statName, categoryName, containerName);
|
||||
con.Output(
|
||||
"No such stat {0} in {1}.{2}", null, statName, categoryName, containerName);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
con.OutputFormat("No such container {0} in category {1}", containerName, categoryName);
|
||||
con.Output("No such container {0} in category {1}", null, containerName, categoryName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
18
OpenSim/Framework/Monitoring/WorkManager.cs
Normal file → Executable file
18
OpenSim/Framework/Monitoring/WorkManager.cs
Normal file → Executable file
@@ -215,23 +215,23 @@ namespace OpenSim.Framework.Monitoring
|
||||
if (subCommand == "stop")
|
||||
{
|
||||
JobEngine.Stop();
|
||||
MainConsole.Instance.OutputFormat("Stopped job engine.");
|
||||
MainConsole.Instance.Output("Stopped job engine.");
|
||||
}
|
||||
else if (subCommand == "start")
|
||||
{
|
||||
JobEngine.Start();
|
||||
MainConsole.Instance.OutputFormat("Started job engine.");
|
||||
MainConsole.Instance.Output("Started job engine.");
|
||||
}
|
||||
else if (subCommand == "status")
|
||||
{
|
||||
MainConsole.Instance.OutputFormat("Job engine running: {0}", JobEngine.IsRunning);
|
||||
MainConsole.Instance.Output("Job engine running: {0}", null, JobEngine.IsRunning);
|
||||
|
||||
JobEngine.Job job = JobEngine.CurrentJob;
|
||||
MainConsole.Instance.OutputFormat("Current job {0}", job != null ? job.Name : "none");
|
||||
MainConsole.Instance.Output("Current job {0}", null, job != null ? job.Name : "none");
|
||||
|
||||
MainConsole.Instance.OutputFormat(
|
||||
"Jobs waiting: {0}", JobEngine.IsRunning ? JobEngine.JobsWaiting.ToString() : "n/a");
|
||||
MainConsole.Instance.OutputFormat("Log Level: {0}", JobEngine.LogLevel);
|
||||
MainConsole.Instance.Output(
|
||||
"Jobs waiting: {0}", null, JobEngine.IsRunning ? JobEngine.JobsWaiting.ToString() : "n/a");
|
||||
MainConsole.Instance.Output("Log Level: {0}", null, JobEngine.LogLevel);
|
||||
}
|
||||
else if (subCommand == "log")
|
||||
{
|
||||
@@ -246,12 +246,12 @@ namespace OpenSim.Framework.Monitoring
|
||||
// if (ConsoleUtil.TryParseConsoleInt(MainConsole.Instance, args[4], out logLevel))
|
||||
// {
|
||||
JobEngine.LogLevel = logLevel;
|
||||
MainConsole.Instance.OutputFormat("Set debug log level to {0}", JobEngine.LogLevel);
|
||||
MainConsole.Instance.Output("Set debug log level to {0}", null, JobEngine.LogLevel);
|
||||
// }
|
||||
}
|
||||
else
|
||||
{
|
||||
MainConsole.Instance.OutputFormat("Unrecognized job engine subcommand {0}", subCommand);
|
||||
MainConsole.Instance.Output("Unrecognized job engine subcommand {0}", null, subCommand);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user