From 6291c513dfb084af91aadec71da11755361166e1 Mon Sep 17 00:00:00 2001 From: Madpeter Date: Wed, 14 Oct 2020 11:36:28 +0100 Subject: [PATCH] adds a try catch on log writer due to locking issues --- Core/bottypes/Log2FileBot.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Core/bottypes/Log2FileBot.cs b/Core/bottypes/Log2FileBot.cs index b154555..494fa17 100644 --- a/Core/bottypes/Log2FileBot.cs +++ b/Core/bottypes/Log2FileBot.cs @@ -45,8 +45,15 @@ namespace BSB.bottypes Rotate(logFilePath); - using var sw = File.AppendText(logFilePath); - sw.WriteLine(message); + try + { + using var sw = File.AppendText(logFilePath); + sw.WriteLine(message); + } + catch + { + + } } private void Rotate(string filePath)