mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-02-06 06:54:58 +00:00
Update ServiceMain.cs
This commit is contained in:
parent
4e6b63df50
commit
7b7a25f5e9
|
@ -397,9 +397,16 @@ namespace WelsonJS.Service
|
|||
Console.WriteLine(_message);
|
||||
}
|
||||
|
||||
using (StreamWriter writer = new StreamWriter(logFilePath, true))
|
||||
try
|
||||
{
|
||||
writer.WriteLine(_message);
|
||||
using (StreamWriter writer = new StreamWriter(logFilePath, true))
|
||||
{
|
||||
writer.WriteLine(_message);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Console.WriteLine($"Failed to write log: {ex.Message}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user