From fc77b3b65007c9cd6b67120f259abe58d0500ebf Mon Sep 17 00:00:00 2001 From: Per Kops Date: Thu, 12 Dec 2024 11:44:45 +0100 Subject: [PATCH] chore(sample): add logging statements to service Start/Stop methods --- sample/Atc.Hosting.TimeFile.Sample/TimeFileScheduleWorker.cs | 2 ++ sample/Atc.Hosting.TimeFile.Sample/TimeFileWorker.cs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/sample/Atc.Hosting.TimeFile.Sample/TimeFileScheduleWorker.cs b/sample/Atc.Hosting.TimeFile.Sample/TimeFileScheduleWorker.cs index f0f9ee6..f4c3223 100644 --- a/sample/Atc.Hosting.TimeFile.Sample/TimeFileScheduleWorker.cs +++ b/sample/Atc.Hosting.TimeFile.Sample/TimeFileScheduleWorker.cs @@ -23,12 +23,14 @@ public TimeFileScheduleWorker( public override Task StartAsync( CancellationToken cancellationToken) { + logger.LogInformation("Started"); return base.StartAsync(cancellationToken); } public override Task StopAsync( CancellationToken cancellationToken) { + logger.LogInformation("Stopped"); return base.StopAsync(cancellationToken); } diff --git a/sample/Atc.Hosting.TimeFile.Sample/TimeFileWorker.cs b/sample/Atc.Hosting.TimeFile.Sample/TimeFileWorker.cs index 64f5984..f7370b6 100644 --- a/sample/Atc.Hosting.TimeFile.Sample/TimeFileWorker.cs +++ b/sample/Atc.Hosting.TimeFile.Sample/TimeFileWorker.cs @@ -23,12 +23,14 @@ public TimeFileWorker( public override Task StartAsync( CancellationToken cancellationToken) { + logger.LogInformation("Started"); return base.StartAsync(cancellationToken); } public override Task StopAsync( CancellationToken cancellationToken) { + logger.LogInformation("Stopped"); return base.StopAsync(cancellationToken); }