From 4065ebff15e228d7227500f3a2275025f5d16966 Mon Sep 17 00:00:00 2001
From: Melanie Thielker
Date: Wed, 20 May 2009 13:50:33 +0000
Subject: Remove the pre-log4net, discrete output methods from the consoles
---
OpenSim/Framework/Console/ConsoleBase.cs | 148 -------------------------------
1 file changed, 148 deletions(-)
(limited to 'OpenSim/Framework/Console/ConsoleBase.cs')
diff --git a/OpenSim/Framework/Console/ConsoleBase.cs b/OpenSim/Framework/Console/ConsoleBase.cs
index dd3c145..0747ae5 100644
--- a/OpenSim/Framework/Console/ConsoleBase.cs
+++ b/OpenSim/Framework/Console/ConsoleBase.cs
@@ -58,154 +58,6 @@ namespace OpenSim.Framework.Console
DefaultPrompt = defaultPrompt;
}
- ///
- /// derive an ansi color from a string, ignoring the darker colors.
- /// This is used to help automatically bin component tags with colors
- /// in various print functions.
- ///
- /// arbitrary string for input
- /// an ansii color
- protected virtual ConsoleColor DeriveColor(string input)
- {
- return ConsoleColor.White;
- }
-
- ///
- /// Sends a warning to the current console output
- ///
- /// The message to send
- /// WriteLine-style message arguments
- public void Warn(string format, params object[] args)
- {
- WriteNewLine(ConsoleColor.Yellow, format, args);
- }
-
- ///
- /// Sends a warning to the current console output
- ///
- /// The module that sent this message
- /// The message to send
- /// WriteLine-style message arguments
- public void Warn(string sender, string format, params object[] args)
- {
- WriteNewLine(DeriveColor(sender), sender, ConsoleColor.Yellow, format, args);
- }
-
- ///
- /// Sends a notice to the current console output
- ///
- /// The message to send
- /// WriteLine-style message arguments
- public void Notice(string format, params object[] args)
- {
- WriteNewLine(ConsoleColor.White, format, args);
- }
-
- ///
- /// Sends a notice to the current console output
- ///
- /// The module that sent this message
- /// The message to send
- /// WriteLine-style message arguments
- public void Notice(string sender, string format, params object[] args)
- {
- WriteNewLine(DeriveColor(sender), sender, ConsoleColor.White, format, args);
- }
- ///
- /// Sends an error to the current console output
- ///
- /// The message to send
- /// WriteLine-style message arguments
- public void Error(string format, params object[] args)
- {
- WriteNewLine(ConsoleColor.Red, format, args);
- }
-
- ///
- /// Sends an error to the current console output
- ///
- /// The module that sent this message
- /// The message to send
- /// WriteLine-style message arguments
- public void Error(string sender, string format, params object[] args)
- {
- WriteNewLine(DeriveColor(sender), sender, ConsoleColor.Red, format, args);
- }
-
- ///
- /// Sends a status message to the current console output
- ///
- /// The message to send
- /// WriteLine-style message arguments
- public void Status(string format, params object[] args)
- {
- WriteNewLine(ConsoleColor.Blue, format, args);
- }
-
- ///
- /// Sends a status message to the current console output
- ///
- /// The module that sent this message
- /// The message to send
- /// WriteLine-style message arguments
- public void Status(string sender, string format, params object[] args)
- {
- WriteNewLine(DeriveColor(sender), sender, ConsoleColor.Blue, format, args);
- }
-
- [Conditional("DEBUG")]
- public void Debug(string format, params object[] args)
- {
- WriteNewLine(ConsoleColor.Gray, format, args);
- }
-
- [Conditional("DEBUG")]
- public void Debug(string sender, string format, params object[] args)
- {
- WriteNewLine(DeriveColor(sender), sender, ConsoleColor.Gray, format, args);
- }
-
- protected virtual void WriteNewLine(ConsoleColor senderColor, string sender, ConsoleColor color, string format, params object[] args)
- {
- WritePrefixLine(senderColor, sender);
- WriteConsoleLine(color, format, args);
- }
-
- protected virtual void WriteNewLine(ConsoleColor color, string format, params object[] args)
- {
- WriteConsoleLine(color, format, args);
- }
-
- protected virtual void WriteConsoleLine(ConsoleColor color, string format, params object[] args)
- {
- try
- {
- System.Console.WriteLine(format, args);
- }
- catch (ObjectDisposedException)
- {
- }
- }
-
- protected virtual void WritePrefixLine(ConsoleColor color, string sender)
- {
- try
- {
- sender = sender.ToUpper();
-
- System.Console.WriteLine("[" + sender + "] ");
-
- System.Console.Write("[");
-
- System.Console.Write(sender);
-
- System.Console.Write("] \t");
- }
- catch (ObjectDisposedException)
- {
- }
- }
-
public virtual void LockOutput()
{
}
--
cgit v1.1