Beispiel #1
0
        /// <summary>
        /// Logs the message, along with current app version and UTC time.
        /// </summary>
        public void Log(string msg)
        {
            var contents = "Version: " + TryGetVersion() + "\n" +
                           DateTime.Now.ToStringWithUtc() + ":\n"
                           + msg + "\n\n";

            ExceptionHelpers.IgnoreException(() =>
                                             File.AppendAllText(filePath, contents));
        }
Beispiel #2
0
 public void Log(string msg)
 {
     ExceptionHelpers.IgnoreException(() =>
                                      File.AppendAllText(filePath, DateTime.Now.ToString() + ":\n" + msg + "\n\n"));
 }