LogFatalError() public static method

Writes FATAL-level message to the configured log.
public static LogFatalError ( string message, Exception exception ) : void
message string The message to log.
exception System.Exception The exception to log.
return void
Esempio n. 1
0
 public static void IncrementValue(string name, long value)
 {
     try
     {
         foreach (var store in ActiveStores)
         {
             store.Increment(name, value);
         }
     }
     catch (Exception ex)
     {
         AppLogger.LogFatalError(String.Format("Error while incrementing {0}", name), ex);
     }
 }
Esempio n. 2
0
        public static IList <StatisticsResults> GetStatistics()
        {
            List <StatisticsResults> stores = new List <StatisticsResults>();

            try
            {
                foreach (var store in ActiveStores)
                {
                    stores.Add(new StatisticsResults(store.GetType().Name, store.GetStatistics()));
                }
            }
            catch (Exception ex)
            {
                AppLogger.LogFatalError("Error while retrieving statistics", ex);
            }

            return(stores);
        }