Exemplo n.º 1
0
 public void Run()
 {
     try
     {
         InitializeProgram();
         Log.Info("Intializations complete...");
         Log.Info("Sending heartbeat");
         GmailEmail.SendEmail();
         Log.Info("Heartbeat sent: " + DateTime.Now.ToString());
     }
     catch (Exception ex)
     {
         Log.Error(ex.ToString());
         Log.Error("Return code: " + Environment.ExitCode);
         Program.PreserveStackTrace(ex);
         throw;
     }
     finally
     {
         if (Log != null)
         {
             Log.Close();
         }
     }
 }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            ApplicationLogging newLog = new ApplicationLogging();

            newLog.LogInit(@"C:\Data\TestAppLogging", @"KenSucks", ".log", true, true);

            newLog.Info("Test Info Ken Sucks");
            newLog.Error("Test Error Ken Sucks");
            newLog.Runtime("Test Runtime Ken Sucks");
            newLog.DataList("Test, Test, Test, Test");
            newLog.Close();
        }