-
Notifications
You must be signed in to change notification settings - Fork 53
Basic orchestration and activity execution logs #405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
4e4bf88
95d8f88
ba337c1
b83cbfd
0d5163e
8a533ac
8afa921
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -9,15 +9,41 @@ | |
| /// <summary> | ||
| /// Log messages. | ||
| /// </summary> | ||
| /// <remarks> | ||
| /// NOTE: Trying to make logs consistent with https://github.com/Azure/durabletask/blob/main/src/DurableTask.Core/Logging/LogEvents.cs. | ||
| /// </remarks> | ||
| static partial class Logs | ||
| { | ||
| internal static ILogger CreateWorkerLogger(ILoggerFactory loggerFactory, params string[] subcategories) | ||
|
Check warning on line 14 in src/Worker/Core/Logs.cs
|
||
| { | ||
| string categoryName = "Microsoft.DurableTask.Worker"; | ||
| if (subcategories.Length > 0) | ||
| { | ||
| categoryName += "." + string.Join(".", subcategories); | ||
| } | ||
|
|
||
| return loggerFactory.CreateLogger(categoryName); | ||
| } | ||
|
|
||
| [LoggerMessage(EventId = 15, Level = LogLevel.Error, Message = "Unhandled exception in entity operation {entityInstanceId}/{operationName}.")] | ||
| public static partial void OperationError(this ILogger logger, Exception ex, EntityInstanceId entityInstanceId, string operationName); | ||
|
Check warning on line 26 in src/Worker/Core/Logs.cs
|
||
|
|
||
| [LoggerMessage(EventId = 55, Level = LogLevel.Information, Message = "{instanceId}: Evaluating custom retry handler for failed '{name}' task. Attempt = {attempt}.")] | ||
| public static partial void RetryingTask(this ILogger logger, string instanceId, string name, int attempt); | ||
|
|
||
| [LoggerMessage(EventId = 600, Level = LogLevel.Information, Message = "'{Name}' orchestration with ID '{InstanceId}' started.")] | ||
cgillum marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| public static partial void OrchestrationStarted(this ILogger logger, string instanceId, string name); | ||
|
|
||
| [LoggerMessage(EventId = 601, Level = LogLevel.Information, Message = "'{Name}' orchestration with ID '{InstanceId}' completed.")] | ||
| public static partial void OrchestrationCompleted(this ILogger logger, string instanceId, string name); | ||
|
|
||
| [LoggerMessage(EventId = 602, Level = LogLevel.Information, Message = "'{Name}' orchestration with ID '{InstanceId}' failed.")] | ||
jviau marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| public static partial void OrchestrationFailed(this ILogger logger, Exception ex, string instanceId, string name); | ||
|
|
||
| [LoggerMessage(EventId = 603, Level = LogLevel.Information, Message = "'{Name}' activity of orchestration ID '{InstanceId}' started.")] | ||
| public static partial void ActivityStarted(this ILogger logger, string instanceId, string name); | ||
|
|
||
| [LoggerMessage(EventId = 604, Level = LogLevel.Information, Message = "'{Name}' activity of orchestration ID '{InstanceId}' completed.")] | ||
| public static partial void ActivityCompleted(this ILogger logger, string instanceId, string name); | ||
|
|
||
| [LoggerMessage(EventId = 605, Level = LogLevel.Information, Message = "'{Name}' activity of orchestration ID '{InstanceId}' failed.")] | ||
| public static partial void ActivityFailed(this ILogger logger, Exception ex, string instanceId, string name); | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.