Пример #1
0
 private void LogPlatform_LogReceived(object sender, LogEventArgs e)
 {
     if (e.Priority >= this.MinPriority)
     {
         string output = this.SyntaxProvider.ParseOutput(e);
         var outputEvent = new OutputEvent(output);
         this.Events.Raise(outputEvent);
     }
 }
Пример #2
0
 public string ParseOutput(LogEventArgs e)
 {
     return "[" + DateTime.Now.ToLongTimeString() + "] (" + e.Priority + ") <" + e.Source + "> " + e.Message;
 }
Пример #3
0
 protected virtual void OnLogReceived(LogEventArgs e)
 {
     EventHandler<LogEventArgs> handler = this.LogReceived;
     if (handler != null) handler(this, e);
 }
Пример #4
0
 public string ParseOutput(LogEventArgs e)
 {
     return "[" + e.Priority + "] " + e.Source + ": " + e.Message;
 }