Skip to content

Commit 4fa3811

Browse files
Revert FlowLogger back to LogTrace
LogTrace works in the CSC Global plugin with the same gateway framework, so the MEL minimum level is not the issue. Reverting to match the established pattern. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ba4c59e commit 4fa3811

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

HydrantCAProxy/FlowLogger.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ public FlowLogger(ILogger logger, string flowName)
2727
_logger = logger ?? throw new ArgumentNullException(nameof(logger));
2828
_flowName = flowName ?? "Unknown";
2929
_stopwatch = Stopwatch.StartNew();
30-
_logger.LogDebug("===== FLOW START: {FlowName} =====", _flowName);
30+
_logger.LogTrace("===== FLOW START: {FlowName} =====", _flowName);
3131
}
3232

3333
public void Step(string name, string detail = null)
3434
{
3535
_steps.Add(new FlowStep(name, FlowStepStatus.Ok, detail));
36-
_logger.LogDebug("[FLOW] {FlowName} -> {StepName}: {Detail}", _flowName, name, detail ?? "OK");
36+
_logger.LogTrace("[FLOW] {FlowName} -> {StepName}: {Detail}", _flowName, name, detail ?? "OK");
3737
}
3838

3939
public void Step(string name, Action action)
@@ -44,13 +44,13 @@ public void Step(string name, Action action)
4444
action();
4545
sw.Stop();
4646
_steps.Add(new FlowStep(name, FlowStepStatus.Ok, $"{sw.ElapsedMilliseconds}ms"));
47-
_logger.LogDebug("[FLOW] {FlowName} -> {StepName}: OK ({Elapsed}ms)", _flowName, name, sw.ElapsedMilliseconds);
47+
_logger.LogTrace("[FLOW] {FlowName} -> {StepName}: OK ({Elapsed}ms)", _flowName, name, sw.ElapsedMilliseconds);
4848
}
4949
catch (Exception ex)
5050
{
5151
sw.Stop();
5252
_steps.Add(new FlowStep(name, FlowStepStatus.Failed, ex.Message));
53-
_logger.LogWarning("[FLOW] {FlowName} -> {StepName}: FAILED - {Error}", _flowName, name, ex.Message);
53+
_logger.LogTrace("[FLOW] {FlowName} -> {StepName}: FAILED - {Error}", _flowName, name, ex.Message);
5454
throw;
5555
}
5656
}
@@ -63,35 +63,35 @@ public async Task StepAsync(string name, Func<Task> action)
6363
await action();
6464
sw.Stop();
6565
_steps.Add(new FlowStep(name, FlowStepStatus.Ok, $"{sw.ElapsedMilliseconds}ms"));
66-
_logger.LogDebug("[FLOW] {FlowName} -> {StepName}: OK ({Elapsed}ms)", _flowName, name, sw.ElapsedMilliseconds);
66+
_logger.LogTrace("[FLOW] {FlowName} -> {StepName}: OK ({Elapsed}ms)", _flowName, name, sw.ElapsedMilliseconds);
6767
}
6868
catch (Exception ex)
6969
{
7070
sw.Stop();
7171
_steps.Add(new FlowStep(name, FlowStepStatus.Failed, ex.Message));
72-
_logger.LogWarning("[FLOW] {FlowName} -> {StepName}: FAILED - {Error}", _flowName, name, ex.Message);
72+
_logger.LogTrace("[FLOW] {FlowName} -> {StepName}: FAILED - {Error}", _flowName, name, ex.Message);
7373
throw;
7474
}
7575
}
7676

7777
public void Fail(string name, string reason)
7878
{
7979
_steps.Add(new FlowStep(name, FlowStepStatus.Failed, reason));
80-
_logger.LogWarning("[FLOW] {FlowName} -> {StepName}: FAILED - {Reason}", _flowName, name, reason);
80+
_logger.LogTrace("[FLOW] {FlowName} -> {StepName}: FAILED - {Reason}", _flowName, name, reason);
8181
}
8282

8383
public void Skip(string name, string reason)
8484
{
8585
_steps.Add(new FlowStep(name, FlowStepStatus.Skipped, reason));
86-
_logger.LogDebug("[FLOW] {FlowName} -> {StepName}: SKIPPED - {Reason}", _flowName, name, reason);
86+
_logger.LogTrace("[FLOW] {FlowName} -> {StepName}: SKIPPED - {Reason}", _flowName, name, reason);
8787
}
8888

8989
public void Dispose()
9090
{
9191
_stopwatch.Stop();
9292
var hasFailure = false;
9393

94-
_logger.LogDebug("===== FLOW DIAGRAM: {FlowName} =====", _flowName);
94+
_logger.LogTrace("===== FLOW DIAGRAM: {FlowName} =====", _flowName);
9595
foreach (var step in _steps)
9696
{
9797
string icon;
@@ -113,12 +113,12 @@ public void Dispose()
113113
}
114114

115115
var detail = string.IsNullOrEmpty(step.Detail) ? "" : $" ({step.Detail})";
116-
_logger.LogDebug(" | {Icon} {StepName}{Detail}", icon, step.Name, detail);
117-
_logger.LogDebug(" v");
116+
_logger.LogTrace(" | {Icon} {StepName}{Detail}", icon, step.Name, detail);
117+
_logger.LogTrace(" v");
118118
}
119119

120120
var result = hasFailure ? "PARTIAL FAILURE" : "SUCCESS";
121-
_logger.LogDebug("===== FLOW RESULT: {Result} ({Elapsed}ms) =====", result, _stopwatch.ElapsedMilliseconds);
121+
_logger.LogTrace("===== FLOW RESULT: {Result} ({Elapsed}ms) =====", result, _stopwatch.ElapsedMilliseconds);
122122
}
123123

124124
private enum FlowStepStatus

0 commit comments

Comments
 (0)