Updated
EonaCat/ci-workflows: SonarQube / sonar (push) Successful in 22s

This commit is contained in:
EonaCat committed 2026-10-08 21:33:54 +02:00
1 parent 4081b5949d
commit 2909500bb8
14 files changed
+342 -114

No files matched your search

+7 -2
View File
@@ -36,7 +36,7 @@ namespace EonaCat.LogStack.Server
_maxLogDirectorySize = maxLogDirectorySize;
}
protected virtual Task ProcessLogAsync(string logData)
protected virtual async Task ProcessLogAsync(string logData)
{
string logsRootDirectory = "logs";
@@ -67,7 +67,12 @@ namespace EonaCat.LogStack.Server
// After processing log, check directory size and clean up if needed
CleanUpOldLogs();
return File.AppendAllTextAsync(logFilePath, logData + Environment.NewLine);
using (var stream = new FileStream(logFilePath, FileMode.Append, FileAccess.Write, FileShare.Read | FileShare.Delete, 4096, FileOptions.Asynchronous))
using (var writer = new StreamWriter(stream))
{
await writer.WriteLineAsync(logData).ConfigureAwait(false);
await writer.FlushAsync().ConfigureAwait(false);
}
}
private void CleanUpOldLogs()