Replace the console for all OpenSim apps with a new console featuring command

line editing, context sensitive help (press ? at any time), command line
history, a new plugin command system and new appender features thet let you
type while the console is scrolling. Seamlessly integrates the ICommander
interfaces.
This commit is contained in:
Melanie Thielker
2009-02-07 12:25:39 +00:00
parent 4d4402158e
commit 54c6a920ba
23 changed files with 1499 additions and 1063 deletions

View File

@@ -37,6 +37,14 @@ namespace OpenSim.Framework.Console
/// </summary>
public class OpenSimAppender : AnsiColorTerminalAppender
{
private ConsoleBase m_console = null;
public ConsoleBase Console
{
get { return m_console; }
set { m_console = value; }
}
private static readonly ConsoleColor[] Colors = {
// the dark colors don't seem to be visible on some black background terminals like putty :(
//ConsoleColor.DarkBlue,
@@ -55,6 +63,9 @@ namespace OpenSim.Framework.Console
override protected void Append(LoggingEvent le)
{
if (m_console != null)
m_console.LockOutput();
try
{
string loggingMessage = RenderLoggingEvent(le);
@@ -96,6 +107,11 @@ namespace OpenSim.Framework.Console
{
System.Console.WriteLine("Couldn't write out log message: {0}", e.ToString());
}
finally
{
if (m_console != null)
m_console.UnlockOutput();
}
}
private void WriteColorText(ConsoleColor color, string sender)