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:
@@ -200,11 +200,10 @@ namespace OpenSim.Framework.Console
|
||||
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];
|
||||
@@ -215,12 +214,7 @@ namespace OpenSim.Framework.Console
|
||||
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);
|
||||
|
||||
Output(text, level, false, false, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user