update ConcatinatingAndCompressingFiles

This commit is contained in:
atef 2024-06-21 10:59:35 +02:00
parent 907fa27180
commit 4e6dcb9895
3 changed files with 2 additions and 4 deletions

View File

@ -25,7 +25,7 @@ public class LogFileConcatenator
foreach (var fileContent in logFiles.Select(File.ReadAllText))
{
concatenatedContent.AppendLine(fileContent);
concatenatedContent.AppendLine(); // Append an empty line to separate the files // maybe we don't need this
//concatenatedContent.AppendLine(); // Append an empty line to separate the files // maybe we don't need this
}
return concatenatedContent.ToString();

View File

@ -40,7 +40,7 @@ public class CustomLogger : ILogger
File.Delete(logFiles.First());
}
var timestamp = DateTime.Now.ToUnixTime() + Environment.NewLine;
var timestamp = "Timestamp;" + DateTime.Now.ToUnixTime() + Environment.NewLine;
var logFileBackupPath = Path.Combine(logFileDir, $"{logFileBaseName}_{DateTime.Now.ToUnixTime()}{logFileExt}");
File.AppendAllText(logFileBackupPath, timestamp + logMessage + Environment.NewLine);

View File

@ -705,8 +705,6 @@ internal static class Program
var logFileConcatenator = new LogFileConcatenator();
var csvToSend = logFileConcatenator.ConcatenateFiles(NbrOfFileToConcatenate);
File.WriteAllText("test.csv",csvToSend);
var s3Path = timeStamp.ToUnixTime() + ".csv";
var request = s3Config.CreatePutRequest(s3Path);