From 605bb6411fc94c2f8bf36482b0975bfa2a65f068 Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 30 Oct 2024 11:43:57 +0100 Subject: [PATCH] logging --- Tools/AutoClient/Modes/FolderStoreMode.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Tools/AutoClient/Modes/FolderStoreMode.cs b/Tools/AutoClient/Modes/FolderStoreMode.cs index f3117c47..e3c4ecf5 100644 --- a/Tools/AutoClient/Modes/FolderStoreMode.cs +++ b/Tools/AutoClient/Modes/FolderStoreMode.cs @@ -178,6 +178,12 @@ namespace AutoClient.Modes if (!recent.Started.HasValue) recent.Started = now; if (!recent.Finish.HasValue) recent.Finish = now; } + + app.Log.Log($"Updated purchase information for PID '{recent.Pid}' for file '{sourceFilename}': " + + $"Submitted: {recent.Submitted.HasValue} " + + $"Started: {recent.Started.HasValue} " + + $"Expiry: {recent.Expiry.HasValue} " + + $"Finish: {recent.Finish.HasValue}"); } private async Task MakeNewPurchase(ICodexInstance instance, CodexNode codex) @@ -202,6 +208,8 @@ namespace AutoClient.Modes Pid = response } ]).ToArray(); + + app.Log.Log($"New purchase created for '{sourceFilename}'. PID: '{response}'"); } private async Task EnsureCid(ICodexInstance instance, CodexNode codex) @@ -224,6 +232,10 @@ namespace AutoClient.Modes app.Log.Log($"Existing CID '{State.Cid}' for '{sourceFilename}' could not be found in the network."); State.Cid = ""; } + else + { + app.Log.Log($"Existing CID '{State.Cid}' for '{sourceFilename}' was successfully found in the network."); + } } if (string.IsNullOrEmpty(State.Cid))