mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
* 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.
This commit is contained in:
@@ -32,17 +32,22 @@ using log4net.Core;
|
||||
|
||||
namespace OpenSim.Framework.Console
|
||||
{
|
||||
/// <summary>
|
||||
/// Writes log information out onto the console
|
||||
/// </summary>
|
||||
public class OpenSimAppender : AnsiColorTerminalAppender
|
||||
{
|
||||
override protected void Append(LoggingEvent le)
|
||||
{
|
||||
try {
|
||||
try
|
||||
{
|
||||
string loggingMessage = RenderLoggingEvent(le);
|
||||
|
||||
string regex = @"^(?<Front>.*?)\[(?<Category>[^\]]+)\]:?(?<End>.*)";
|
||||
|
||||
Regex RE = new Regex(regex, RegexOptions.Multiline);
|
||||
MatchCollection matches = RE.Matches(loggingMessage);
|
||||
|
||||
// Get some direct matches $1 $4 is a
|
||||
if (matches.Count == 1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user