adds a try catch on log writer due to locking issues
This commit is contained in:
parent
3ba59c90df
commit
6291c513df
1 changed files with 9 additions and 2 deletions
|
|
@ -45,8 +45,15 @@ namespace BSB.bottypes
|
||||||
|
|
||||||
Rotate(logFilePath);
|
Rotate(logFilePath);
|
||||||
|
|
||||||
using var sw = File.AppendText(logFilePath);
|
try
|
||||||
sw.WriteLine(message);
|
{
|
||||||
|
using var sw = File.AppendText(logFilePath);
|
||||||
|
sw.WriteLine(message);
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Rotate(string filePath)
|
private void Rotate(string filePath)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue