From c602d76b79f09c745ae4e7a1a7ab6a2d6f2c3bff Mon Sep 17 00:00:00 2001
From: Justin Clarke Casey
Date: Sat, 16 Aug 2008 20:24:08 +0000
Subject: * Insert a new 'set log level [level] command on the console' * The
primary immediate use is to provide a means of temporarily reducing log
output on the console when executing console commands * Changing the log
level on the console is not permanent and does not affect the log information
being put into OpenSim.log * This could have been done by putting in a
threshold level on the Console appeneder in OpenSim.exe.config and
implementing config watching in the code. * But I think that it's a little
more user friendly to make this doable via the console.
---
OpenSim/Framework/Console/OpenSimAppender.cs | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Framework/Console/OpenSimAppender.cs')
diff --git a/OpenSim/Framework/Console/OpenSimAppender.cs b/OpenSim/Framework/Console/OpenSimAppender.cs
index ddd6d9a..2527977 100644
--- a/OpenSim/Framework/Console/OpenSimAppender.cs
+++ b/OpenSim/Framework/Console/OpenSimAppender.cs
@@ -32,17 +32,22 @@ using log4net.Core;
namespace OpenSim.Framework.Console
{
+ ///
+ /// Writes log information out onto the console
+ ///
public class OpenSimAppender : AnsiColorTerminalAppender
{
override protected void Append(LoggingEvent le)
{
- try {
+ try
+ {
string loggingMessage = RenderLoggingEvent(le);
string regex = @"^(?.*?)\[(?[^\]]+)\]:?(?.*)";
Regex RE = new Regex(regex, RegexOptions.Multiline);
MatchCollection matches = RE.Matches(loggingMessage);
+
// Get some direct matches $1 $4 is a
if (matches.Count == 1)
{
--
cgit v1.1