mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
Massive console refactor. Greatly simplify interface.
This commit is contained in:
16
OpenSim/Framework/Console/RemoteConsole.cs
Normal file → Executable file
16
OpenSim/Framework/Console/RemoteConsole.cs
Normal file → Executable file
@@ -188,13 +188,19 @@ namespace OpenSim.Framework.Console
|
||||
m_Server.AddHTTPHandler("/SessionCommand/", HandleHttpSessionCommand);
|
||||
}
|
||||
|
||||
public override void Output(string text, string level)
|
||||
public override void Output(string format, string level = null, params object[] components)
|
||||
{
|
||||
Output(text, level, false, false, false);
|
||||
if (components.Length == 0)
|
||||
Output(format, level, false, false, false);
|
||||
else
|
||||
Output(String.Format(format, components), level, false, false, false);
|
||||
}
|
||||
|
||||
protected void Output(string text, string level, bool isPrompt, bool isCommand, bool isInput)
|
||||
{
|
||||
if (level == null)
|
||||
level = String.Empty;
|
||||
|
||||
// Increment the line number. It was 0 and they start at 1
|
||||
// so we need to pre-increment.
|
||||
m_lineNumber++;
|
||||
@@ -228,12 +234,6 @@ namespace OpenSim.Framework.Console
|
||||
System.Console.WriteLine(text.Trim());
|
||||
}
|
||||
|
||||
public override void Output(string text)
|
||||
{
|
||||
// Output plain (non-logging style) text.
|
||||
Output(text, String.Empty, false, false, false);
|
||||
}
|
||||
|
||||
public override string ReadLine(string p, bool isCommand, bool e)
|
||||
{
|
||||
// Output the prompt an prepare to wait. This
|
||||
|
||||
Reference in New Issue
Block a user