Example #1
0
 private static void LogMessage(RealPlugin.DebugLevelEnum level, string message)
 {
     if (OnLogEvent != null)
     {
         OnLogEvent(level, message);
     }
 }
Example #2
0
 internal void AddToLog(RealPlugin p, RealPlugin.DebugLevelEnum level, string message)
 {
     RealPlugin.DebugLevelEnum dx = GetDebugLevel(p);
     if (level > dx)
     {
         return;
     }
     p.UnfilteredAddToLog(level, message);
 }
Example #3
0
        private List <InternalLog> BuildDataset()
        {
            List <InternalLog> p1 = new List <InternalLog>();

            RealPlugin.DebugLevelEnum level = (RealPlugin.DebugLevelEnum)(cbxLevel.SelectedIndex + 1);
            Regex rex = null;

            if (rexSearch.Text != null && rexSearch.Text.Trim().Length > 0)
            {
                rex = new Regex(rexSearch.Text);
            }
            switch (cbxLevelMethod.SelectedIndex)
            {
            case 0:
                p1.AddRange(from ix in logData where ix.Level > level && (rex == null || rex.IsMatch(ix.Message) == true) select ix);
                break;

            case 1:
                p1.AddRange(from ix in logData where ix.Level >= level && (rex == null || rex.IsMatch(ix.Message) == true) select ix);
                break;

            case 2:
                p1.AddRange(from ix in logData where ix.Level == level && (rex == null || rex.IsMatch(ix.Message) == true) select ix);
                break;

            case 3:
                p1.AddRange(from ix in logData where ix.Level <= level && (rex == null || rex.IsMatch(ix.Message) == true) select ix);
                break;

            case 4:
                p1.AddRange(from ix in logData where ix.Level < level && (rex == null || rex.IsMatch(ix.Message) == true) select ix);
                break;

            case 5:
                p1.AddRange(from ix in logData where ix.Level != level && (rex == null || rex.IsMatch(ix.Message) == true) select ix);
                break;
            }
            return(p1);
        }