blob: d91806427f34a8b66c20e75c9bc0faeb41b7f455 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
using System;
using System.Diagnostics;
using System.IO;
namespace UVtools.WPF
{
public static class ErrorLog
{
private const string Filename = "errors.log";
public static string FullPath = Path.Combine(UserSettings.SettingsFolder, Filename);
public static void AppendLine(string errorType, string text)
{
try
{
File.AppendAllText(FullPath,
$"({errorType}) @ {DateTime.Now}: {text}{Environment.NewLine}");
}
catch (Exception exception)
{
Debug.WriteLine(exception);
}
}
public static StreamWriter AppendText()
{
return File.AppendText(FullPath);
}
}
}
|