mirror of
https://github.com/LBPUnion/ProjectLighthouse.git
synced 2025-08-08 12:58:41 +00:00
Ignore mystery exception on windows
This commit is contained in:
parent
0a39db4dc3
commit
a619b4b245
1 changed files with 7 additions and 2 deletions
|
@ -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";
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
File.AppendAllText(Path.Combine(logsDirectory, line.LoggerLevel.Name.ToFileName() + ".log"), contentFile);
|
File.AppendAllText(Path.Combine(logsDirectory, line.LoggerLevel.Name.ToFileName() + ".log"), contentFile);
|
||||||
File.AppendAllText(Path.Combine(logsDirectory, "all.log"), contentAll);
|
File.AppendAllText(Path.Combine(logsDirectory, "all.log"), contentAll);
|
||||||
}
|
}
|
||||||
|
catch (IOException) { } // windows, ya goofed
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue