Merge branch 'master' of melanie@opensimulator.org:/var/git/opensim

viewer-2-initial-appearance
Melanie 2010-10-09 01:05:05 +01:00
commit 96080dc492
2 changed files with 21 additions and 17 deletions

View File

@ -44,6 +44,7 @@ namespace OpenSim.Framework.Console
// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
// private readonly object m_syncRoot = new object(); // private readonly object m_syncRoot = new object();
private const string LOGLEVEL_NONE = "(none)";
private int y = -1; private int y = -1;
private int cp = 0; private int cp = 0;
@ -278,22 +279,25 @@ namespace OpenSim.Framework.Console
private void WriteLocalText(string text, string level) private void WriteLocalText(string text, string level)
{ {
string regex = @"^(?<Front>.*?)\[(?<Category>[^\]]+)\]:?(?<End>.*)";
Regex RE = new Regex(regex, RegexOptions.Multiline);
MatchCollection matches = RE.Matches(text);
string outText = text; string outText = text;
if (matches.Count == 1) if (level != LOGLEVEL_NONE)
{ {
outText = matches[0].Groups["End"].Value; string regex = @"^(?<Front>.*?)\[(?<Category>[^\]]+)\]:?(?<End>.*)";
System.Console.Write(matches[0].Groups["Front"].Value);
System.Console.Write("["); Regex RE = new Regex(regex, RegexOptions.Multiline);
WriteColorText(DeriveColor(matches[0].Groups["Category"].Value), MatchCollection matches = RE.Matches(text);
matches[0].Groups["Category"].Value);
System.Console.Write("]:"); if (matches.Count == 1)
{
outText = matches[0].Groups["End"].Value;
System.Console.Write(matches[0].Groups["Front"].Value);
System.Console.Write("[");
WriteColorText(DeriveColor(matches[0].Groups["Category"].Value),
matches[0].Groups["Category"].Value);
System.Console.Write("]:");
}
} }
if (level == "error") if (level == "error")
@ -308,7 +312,7 @@ namespace OpenSim.Framework.Console
public override void Output(string text) public override void Output(string text)
{ {
Output(text, "normal"); Output(text, LOGLEVEL_NONE);
} }
public override void Output(string text, string level) public override void Output(string text, string level)

View File

@ -140,10 +140,10 @@ namespace OpenSim.Framework.Tests
settings.Save(); settings.Save();
settings.OnSave -= RegionSaveFired; settings.OnSave -= RegionSaveFired;
string str = settings.LoadedCreationDate; // string str = settings.LoadedCreationDate;
int dt = settings.LoadedCreationDateTime; // int dt = settings.LoadedCreationDateTime;
string id = settings.LoadedCreationID; // string id = settings.LoadedCreationID;
string time = settings.LoadedCreationTime; // string time = settings.LoadedCreationTime;
Assert.That(m_RegionSettingsOnSaveEventFired, "RegionSettings Save Event didn't Fire"); Assert.That(m_RegionSettingsOnSaveEventFired, "RegionSettings Save Event didn't Fire");