We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ac6f3d commit 17344cdCopy full SHA for 17344cd
src/ProjectTemplates/Web.ProjectTemplates/content/Worker-CSharp/Worker.cs
@@ -1,4 +1,6 @@
1
using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
using System.Threading;
5
using System.Threading.Tasks;
6
using Microsoft.Extensions.Hosting;
@@ -19,7 +21,7 @@ protected override async Task ExecuteAsync(CancellationToken stoppingToken)
19
21
{
20
22
while (!stoppingToken.IsCancellationRequested)
23
- _logger.LogInformation($"Worker running at: {DateTime.Now}");
24
+ _logger.LogInformation("Worker running at: {time}", DateTimeOffset.Now);
25
await Task.Delay(1000, stoppingToken);
26
}
27
0 commit comments