From 284261f3ea66869436ac526301475bbf58130432 Mon Sep 17 00:00:00 2001 From: cocoa-dev004 <66989461+cocoa-dev004@users.noreply.github.com> Date: Fri, 8 Jul 2022 15:52:55 +0900 Subject: [PATCH] Fixed file name of event log --- Covid19Radar/Covid19Radar/Repository/EventLogRepository.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Covid19Radar/Covid19Radar/Repository/EventLogRepository.cs b/Covid19Radar/Covid19Radar/Repository/EventLogRepository.cs index 509248a38..8ba4d1b70 100644 --- a/Covid19Radar/Covid19Radar/Repository/EventLogRepository.cs +++ b/Covid19Radar/Covid19Radar/Repository/EventLogRepository.cs @@ -62,7 +62,7 @@ private string GetFileName(EventLog eventLog) using var sha = SHA256.Create(); var textBytes = Encoding.UTF8.GetBytes(clearText); - string hash = Convert.ToBase64String(sha.ComputeHash(textBytes)); + string hash = Convert.ToBase64String(sha.ComputeHash(textBytes)).TrimEnd('=').Replace('+', '-').Replace('/', '_'); return $"{hash}{LOG_EXTENSION}"; } @@ -100,6 +100,7 @@ private async Task AddAsyncInternal(EventLog eventLog, long maxSize) } await File.WriteAllTextAsync(filePath, serializedJson); + _loggerService.Info($"Write event log. filePath:{filePath}"); return true; }