@@ -7,8 +7,19 @@ namespace BridgingIT.DevKit.Common;
77
88using Microsoft . Extensions . Logging ;
99
10- internal static partial class PipelineTypedLogger
10+ /// <summary>
11+ /// Provides source-generated logging helpers for pipeline execution events.
12+ /// </summary>
13+ public static partial class PipelineTypedLogger
1114{
15+ /// <summary>
16+ /// Logs that a pipeline execution has started.
17+ /// </summary>
18+ /// <param name="logger">The logger to write to.</param>
19+ /// <param name="logKey">The structured log key.</param>
20+ /// <param name="pipelineName">The pipeline name.</param>
21+ /// <param name="executionId">The pipeline execution identifier.</param>
22+ /// <param name="correlationId">The correlation identifier for the execution.</param>
1223 [ LoggerMessage (
1324 EventId = 1 ,
1425 Level = LogLevel . Debug ,
@@ -20,6 +31,15 @@ public static partial void LogPipelineStarted(
2031 Guid executionId ,
2132 string correlationId ) ;
2233
34+ /// <summary>
35+ /// Logs that a pipeline execution has finished.
36+ /// </summary>
37+ /// <param name="logger">The logger to write to.</param>
38+ /// <param name="logKey">The structured log key.</param>
39+ /// <param name="pipelineName">The pipeline name.</param>
40+ /// <param name="executionId">The pipeline execution identifier.</param>
41+ /// <param name="status">The final execution status.</param>
42+ /// <param name="durationMs">The elapsed duration in milliseconds.</param>
2343 [ LoggerMessage (
2444 EventId = 2 ,
2545 Level = LogLevel . Debug ,
@@ -32,21 +52,39 @@ public static partial void LogPipelineFinished(
3252 PipelineExecutionStatus status ,
3353 double durationMs ) ;
3454
55+ /// <summary>
56+ /// Logs that a pipeline step has started.
57+ /// </summary>
58+ /// <param name="logger">The logger to write to.</param>
59+ /// <param name="logKey">The structured log key.</param>
60+ /// <param name="pipelineName">The pipeline name.</param>
61+ /// <param name="stepName">The step name.</param>
62+ /// <param name="executionId">The pipeline execution identifier.</param>
3563 [ LoggerMessage (
3664 EventId = 3 ,
3765 Level = LogLevel . Debug ,
38- Message = "[{LogKey}] step started (pipeline={PipelineName}, step={StepName}, executionId={ExecutionId})" ) ]
66+ Message = "[{LogKey}] pipeline step started (pipeline={PipelineName}, step={StepName}, executionId={ExecutionId})" ) ]
3967 public static partial void LogStepStarted (
4068 ILogger logger ,
4169 string logKey ,
4270 string pipelineName ,
4371 string stepName ,
4472 Guid executionId ) ;
4573
74+ /// <summary>
75+ /// Logs that a pipeline step has finished.
76+ /// </summary>
77+ /// <param name="logger">The logger to write to.</param>
78+ /// <param name="logKey">The structured log key.</param>
79+ /// <param name="pipelineName">The pipeline name.</param>
80+ /// <param name="stepName">The step name.</param>
81+ /// <param name="executionId">The pipeline execution identifier.</param>
82+ /// <param name="outcome">The final step outcome.</param>
83+ /// <param name="durationMs">The elapsed duration in milliseconds.</param>
4684 [ LoggerMessage (
4785 EventId = 4 ,
4886 Level = LogLevel . Debug ,
49- Message = "[{LogKey}] step finished (pipeline={PipelineName}, step={StepName}, executionId={ExecutionId}, outcome={Outcome}) -> took {DurationMs}ms" ) ]
87+ Message = "[{LogKey}] pipeline step finished (pipeline={PipelineName}, step={StepName}, executionId={ExecutionId}, outcome={Outcome}) -> took {DurationMs}ms" ) ]
5088 public static partial void LogStepFinished (
5189 ILogger logger ,
5290 string logKey ,
@@ -56,10 +94,21 @@ public static partial void LogStepFinished(
5694 PipelineControlOutcome outcome ,
5795 double durationMs ) ;
5896
97+ /// <summary>
98+ /// Logs that a pipeline step requested a retry.
99+ /// </summary>
100+ /// <param name="logger">The logger to write to.</param>
101+ /// <param name="logKey">The structured log key.</param>
102+ /// <param name="pipelineName">The pipeline name.</param>
103+ /// <param name="stepName">The step name.</param>
104+ /// <param name="executionId">The pipeline execution identifier.</param>
105+ /// <param name="attempt">The current attempt number.</param>
106+ /// <param name="maxAttempts">The configured maximum number of attempts.</param>
107+ /// <param name="message">The retry reason.</param>
59108 [ LoggerMessage (
60109 EventId = 5 ,
61110 Level = LogLevel . Warning ,
62- Message = "[{LogKey}] step retry requested (pipeline={PipelineName}, step={StepName}, executionId={ExecutionId}, attempt={Attempt}, maxAttempts={MaxAttempts}, message={Message})" ) ]
111+ Message = "[{LogKey}] pipeline step retry requested (pipeline={PipelineName}, step={StepName}, executionId={ExecutionId}, attempt={Attempt}, maxAttempts={MaxAttempts}, message={Message})" ) ]
63112 public static partial void LogStepRetrying (
64113 ILogger logger ,
65114 string logKey ,
@@ -70,10 +119,19 @@ public static partial void LogStepRetrying(
70119 int maxAttempts ,
71120 string message ) ;
72121
122+ /// <summary>
123+ /// Logs that a pipeline step threw an exception.
124+ /// </summary>
125+ /// <param name="logger">The logger to write to.</param>
126+ /// <param name="logKey">The structured log key.</param>
127+ /// <param name="pipelineName">The pipeline name.</param>
128+ /// <param name="stepName">The step name.</param>
129+ /// <param name="executionId">The pipeline execution identifier.</param>
130+ /// <param name="exception">The exception that was thrown.</param>
73131 [ LoggerMessage (
74132 EventId = 6 ,
75133 Level = LogLevel . Error ,
76- Message = "[{LogKey}] step exception (pipeline={PipelineName}, step={StepName}, executionId={ExecutionId})" ) ]
134+ Message = "[{LogKey}] pipeline step failure (pipeline={PipelineName}, step={StepName}, executionId={ExecutionId})" ) ]
77135 public static partial void LogStepException (
78136 ILogger logger ,
79137 string logKey ,
@@ -82,6 +140,14 @@ public static partial void LogStepException(
82140 Guid executionId ,
83141 Exception exception ) ;
84142
143+ /// <summary>
144+ /// Logs that the pipeline execution threw an exception.
145+ /// </summary>
146+ /// <param name="logger">The logger to write to.</param>
147+ /// <param name="logKey">The structured log key.</param>
148+ /// <param name="pipelineName">The pipeline name.</param>
149+ /// <param name="executionId">The pipeline execution identifier.</param>
150+ /// <param name="exception">The exception that was thrown.</param>
85151 [ LoggerMessage (
86152 EventId = 7 ,
87153 Level = LogLevel . Error ,
@@ -93,21 +159,37 @@ public static partial void LogPipelineException(
93159 Guid executionId ,
94160 Exception exception ) ;
95161
162+ /// <summary>
163+ /// Logs that a pipeline hook threw an exception that was ignored.
164+ /// </summary>
165+ /// <param name="logger">The logger to write to.</param>
166+ /// <param name="logKey">The structured log key.</param>
167+ /// <param name="pipelineName">The pipeline name.</param>
168+ /// <param name="executionId">The pipeline execution identifier.</param>
169+ /// <param name="exception">The exception that was ignored.</param>
96170 [ LoggerMessage (
97171 EventId = 8 ,
98172 Level = LogLevel . Warning ,
99- Message = "[{LogKey}] hook failure ignored (pipeline={PipelineName}, executionId={ExecutionId})" ) ]
173+ Message = "[{LogKey}] pipeline hook failure ignored (pipeline={PipelineName}, executionId={ExecutionId})" ) ]
100174 public static partial void LogHookFailure (
101175 ILogger logger ,
102176 string logKey ,
103177 string pipelineName ,
104178 Guid executionId ,
105179 Exception exception ) ;
106180
181+ /// <summary>
182+ /// Logs that a pipeline completion callback failed.
183+ /// </summary>
184+ /// <param name="logger">The logger to write to.</param>
185+ /// <param name="logKey">The structured log key.</param>
186+ /// <param name="pipelineName">The pipeline name.</param>
187+ /// <param name="executionId">The pipeline execution identifier.</param>
188+ /// <param name="exception">The exception that was thrown by the callback.</param>
107189 [ LoggerMessage (
108190 EventId = 9 ,
109191 Level = LogLevel . Error ,
110- Message = "[{LogKey}] completion callback failed (pipeline={PipelineName}, executionId={ExecutionId})" ) ]
192+ Message = "[{LogKey}] pipeline completion callback failed (pipeline={PipelineName}, executionId={ExecutionId})" ) ]
111193 public static partial void LogCompletionCallbackFailed (
112194 ILogger logger ,
113195 string logKey ,
0 commit comments