Ignore mystery exception on windows

This commit is contained in:
LumaLivy 2021-11-07 17:11:33 -05:00
commit a619b4b245

View file

@ -20,8 +20,13 @@ namespace LBPUnion.ProjectLighthouse.Logging
string contentFile = $"{channel}{line.LineData}\n"; string contentFile = $"{channel}{line.LineData}\n";
string contentAll = $"[{$"{line.LoggerLevel.Name} {channel}".TrimEnd()}] {line.LineData}\n"; string contentAll = $"[{$"{line.LoggerLevel.Name} {channel}".TrimEnd()}] {line.LineData}\n";
File.AppendAllText(Path.Combine(logsDirectory, line.LoggerLevel.Name.ToFileName() + ".log"), contentFile); try
File.AppendAllText(Path.Combine(logsDirectory, "all.log"), contentAll); {
File.AppendAllText(Path.Combine(logsDirectory, line.LoggerLevel.Name.ToFileName() + ".log"), contentFile);
File.AppendAllText(Path.Combine(logsDirectory, "all.log"), contentAll);
}
catch (IOException) { } // windows, ya goofed
} }
} }
} }