Skip to content

Commit 369b85c

Browse files
committed
Added logger for orchestration context
1 parent 73f5625 commit 369b85c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using Microsoft.DurableTask;
2+
using Microsoft.Extensions.Logging;
3+
4+
namespace CoreHelpers.Extensions.Logging.DurableTask
5+
{
6+
public static class LoggerExtension
7+
{
8+
public static void LogInformationReplayingAware(this ILogger logger, TaskOrchestrationContext context, string? message, params object?[] args)
9+
{
10+
if (!context.IsReplaying)
11+
logger.LogInformation(message, args);
12+
}
13+
}
14+
15+
}

0 commit comments

Comments
 (0)