From 863db20b8599236a91b24a4bd7f1e30e36b4ef7d Mon Sep 17 00:00:00 2001 From: Jordi Date: Sun, 4 Feb 2024 12:09:45 +0100 Subject: [PATCH] Adding logging of current user name for troubleshooting during alpha release... --- src/FakeXrmEasy.Core/Middleware/MiddlewareBuilder.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/FakeXrmEasy.Core/Middleware/MiddlewareBuilder.cs b/src/FakeXrmEasy.Core/Middleware/MiddlewareBuilder.cs index 87c7f89f..73246553 100644 --- a/src/FakeXrmEasy.Core/Middleware/MiddlewareBuilder.cs +++ b/src/FakeXrmEasy.Core/Middleware/MiddlewareBuilder.cs @@ -143,7 +143,13 @@ public IMiddlewareBuilder SetLicense(FakeXrmEasyLicense license) /// public IMiddlewareBuilder SetSubscriptionStorageProvider(ISubscriptionStorageProvider storageProvider, bool upgradeRequested = false, bool renewalRequested = false) { - SubscriptionManager.SetSubscriptionStorageProvider(storageProvider, new UserReader(), upgradeRequested, renewalRequested); + var userReader = new UserReader(); + Console.WriteLine($"Setting Subscription Storage Provider..."); + Console.WriteLine($" -> Running as '{userReader.GetCurrentUserName()}' ..."); + + SubscriptionManager.SetSubscriptionStorageProvider(storageProvider, userReader, upgradeRequested, renewalRequested); + + Console.WriteLine($"Setting Subscription Storage Provider ok."); return this; } }