예제 #1
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();
        }
예제 #2
0
 public void InitializeLog()
 {
     try
     {
         Log.LogInit(@"C:\DATA\TestHeart",
                     "Heartbeat",
                     ".log",
                     true,
                     true);
         Log.Runtime("Heartbeat - Version: " +
                     System.Reflection.Assembly
                     .GetExecutingAssembly().GetName().Version.ToString());
     }
     catch (Exception ex)
     {
         Environment.ExitCode = 65;
         Program.PreserveStackTrace(ex);
         throw;
     }
 }