From ea5ce5617a5d86e71b0401409fdd8b967be46a3e Mon Sep 17 00:00:00 2001 From: atef Date: Tue, 3 Oct 2023 16:00:28 +0200 Subject: [PATCH] add loginfo on the toCsv() --- csharp/App/SaliMax/src/Program.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/csharp/App/SaliMax/src/Program.cs b/csharp/App/SaliMax/src/Program.cs index 78c2eeb6d..043bcacf1 100644 --- a/csharp/App/SaliMax/src/Program.cs +++ b/csharp/App/SaliMax/src/Program.cs @@ -316,14 +316,17 @@ internal static class Program private static async Task UploadCsv(StatusRecord status, DateTime timeStamp) { var s3Config = status.Config.S3; + var csv = status.ToCsv().LogInfo(); if (s3Config is null) return false; - var csv = status.ToCsv(); var s3Path = timeStamp + ".csv"; var request = s3Config.CreatePutRequest(s3Path); var response = await request.PutAsync(new StringContent(csv)); + // This is temporary for Wittman + //await File.WriteAllTextAsync("/var/www/html/status.csv", csv.SplitLines().Where(l => !l.Contains("Secret")).JoinLines()); + if (response.StatusCode != 200) { Console.WriteLine("ERROR: PUT");