Skip to content

Commit 23e22e4

Browse files
author
Per Kops
committed
chore(sample): add logging statements to service Start/Stop methods
1 parent c2d7188 commit 23e22e4

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

sample/Atc.Hosting.TimeFile.Sample/TimeFileScheduleWorker.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ public TimeFileScheduleWorker(
2323
public override Task StartAsync(
2424
CancellationToken cancellationToken)
2525
{
26+
logger.LogInformation("Started");
2627
return base.StartAsync(cancellationToken);
2728
}
2829

2930
public override Task StopAsync(
3031
CancellationToken cancellationToken)
3132
{
33+
logger.LogInformation("Stopped");
3234
return base.StopAsync(cancellationToken);
3335
}
3436

sample/Atc.Hosting.TimeFile.Sample/TimeFileWorker.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ public TimeFileWorker(
2323
public override Task StartAsync(
2424
CancellationToken cancellationToken)
2525
{
26+
logger.LogInformation("Started");
2627
return base.StartAsync(cancellationToken);
2728
}
2829

2930
public override Task StopAsync(
3031
CancellationToken cancellationToken)
3132
{
33+
logger.LogInformation("Stopped");
3234
return base.StopAsync(cancellationToken);
3335
}
3436

0 commit comments

Comments
 (0)