Exemplo n.º 1
0
 protected virtual void PrintMessage(MessageStruct message, MessageImportance messageImportance)
 {
     if ((message != null) && (message.Text != null) && (message.Text.Length > 0))
     {
         string category = message.Category;
         if ((category == "fatal error") || (category == "error"))
         {
             base.Log.LogError(null, message.Code, null, message.Filename, message.Line, message.Column, 0, 0, message.Text.TrimEnd(new char[0]), new object[0]);
         }
         else if (category == "warning")
         {
             base.Log.LogWarning(null, message.Code, null, message.Filename, message.Line, message.Column, 0, 0, message.Text.TrimEnd(new char[0]), new object[0]);
         }
         else if (category == "note")
         {
             base.Log.LogCriticalMessage(null, message.Code, null, message.Filename, message.Line, message.Column, 0, 0, message.Text.TrimEnd(new char[0]), new object[0]);
         }
         else
         {
             base.Log.LogMessage(messageImportance, message.Text.TrimEnd(new char[0]), new object[0]);
         }
         message.Clear();
     }
 }