Example #1
0
 public void Trace(VulcanMessage e)
 {
     _errorDictionary[e.Severity].Add(e);
     if (e.Severity == Severity.Debug)
     {
         if (Vulcan.Properties.Settings.Default.ShowDebug)
         {
             Console.WriteLine("{0}:{1}", Name, e.Message);
         }
     }
     else if (e.Severity == Severity.Warning || e.Severity == Severity.Error)
     {
         Console.Error.WriteLine("{0}:{1}", Name, e.Message);
     }
     else
     {
         if (Vulcan.Properties.Settings.Default.ShowNotifications || e.Severity == Severity.Alert)
         {
             Console.WriteLine("{0}:{1}", Name, e.Message);
         }
     }
     if ((e.Severity == Severity.Error) && (_breakOnError))
     {
         throw new Exception(e.Message);
     }
 }
Example #2
0
        public static void Trace(Severity severity, Exception exception, string message, params object[] formatParameters)
        {
            VulcanMessage ve = new VulcanMessage(severity, exception, message, formatParameters);

            lock (engineStack)
            {
                engineStack.Peek().Trace(ve);
            }
        }
Example #3
0
 public void Trace(VulcanMessage e)
 {
     _errorDictionary[e.Severity].Add(e);
     if (e.Severity == Severity.Debug)
     {
         if (Vulcan.Properties.Settings.Default.ShowDebug)
         {
             Console.WriteLine("{0}:{1}",Name,e.Message);
         }
     }
     else if (e.Severity == Severity.Warning || e.Severity == Severity.Error)
     {
         Console.Error.WriteLine("{0}:{1}", Name, e.Message);
     }
     else
     {
         if (Vulcan.Properties.Settings.Default.ShowNotifications || e.Severity == Severity.Alert)
         {
             Console.WriteLine("{0}:{1}", Name, e.Message);
         }
     }
     if ((e.Severity == Severity.Error) && (_breakOnError))
     {
         throw new Exception(e.Message);
     }
 }
Example #4
0
 public static void Trace(Severity severity, Exception exception, string message, params object[] formatParameters)
 {
     VulcanMessage ve = new VulcanMessage(severity, exception, message, formatParameters);
     lock (engineStack)
     {
         engineStack.Peek().Trace(ve);
     }
 }