mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
a few changes to local console; add pooling of Console.KeyAvailable instead of waiting on keyread, that has treading issues. Thanks ALicia for some ideas on this
This commit is contained in:
@@ -91,14 +91,13 @@ namespace OpenSim.Framework.Console
|
||||
|
||||
public virtual void Output(string format, params object[] components)
|
||||
{
|
||||
string level = null;
|
||||
//string level = null;
|
||||
if (components != null && components.Length > 0)
|
||||
{
|
||||
if (components[0] == null || components[0] is ConsoleLevel)
|
||||
ConsoleLevel cl = components[0] as ConsoleLevel;
|
||||
if (cl != null)
|
||||
{
|
||||
if (components[0] is ConsoleLevel)
|
||||
level = ((ConsoleLevel)components[0]).ToString();
|
||||
|
||||
//level = cl.ToString();
|
||||
if (components.Length > 1)
|
||||
{
|
||||
object[] tmp = new object[components.Length - 1];
|
||||
@@ -108,13 +107,9 @@ namespace OpenSim.Framework.Console
|
||||
else
|
||||
components = null;
|
||||
}
|
||||
|
||||
}
|
||||
string text;
|
||||
if (components == null || components.Length == 0)
|
||||
text = format;
|
||||
else
|
||||
text = String.Format(format, components);
|
||||
|
||||
string text = (components == null || components.Length == 0) ? format : String.Format(format, components);
|
||||
|
||||
System.Console.WriteLine(text);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user