Skip to content

Commit 17344cd

Browse files
committed
Improvements to Worker.cs project template item
Fixes #8354
1 parent 1ac6f3d commit 17344cd

File tree

1 file changed

+3
-1
lines changed
  • src/ProjectTemplates/Web.ProjectTemplates/content/Worker-CSharp

1 file changed

+3
-1
lines changed

src/ProjectTemplates/Web.ProjectTemplates/content/Worker-CSharp/Worker.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
24
using System.Threading;
35
using System.Threading.Tasks;
46
using Microsoft.Extensions.Hosting;
@@ -19,7 +21,7 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
1921
{
2022
while (!stoppingToken.IsCancellationRequested)
2123
{
22-
_logger.LogInformation($"Worker running at: {DateTime.Now}");
24+
_logger.LogInformation("Worker running at: {time}", DateTimeOffset.Now);
2325
await Task.Delay(1000, stoppingToken);
2426
}
2527
}

0 commit comments

Comments
 (0)