Skip to content

Commit 642e334

Browse files
committed
Update logging to use payload.Messages consistently
Modified logging behavior in InstallPluginCommandOptionsHandler, UninstallPluginCommandOptionsHandler, and UpdatePluginCommandOptionsHandler classes. Replaced `_flowCtlLogger.Write(payload.Data)` with `_flowCtlLogger.Write(payload.Messages)` in the `else` block of the `try` statement to ensure consistent logging of payload messages regardless of operation success. #132
1 parent 0a3eca6 commit 642e334

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/FlowCtl/Commands/Plugins/Install/InstallPluginCommandOptionsHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ private async Task Execute(InstallPluginCommandOptions options, CancellationToke
6161
if (payload is { Succeeded: false })
6262
_flowCtlLogger.WriteError(payload.Messages);
6363
else
64-
_flowCtlLogger.Write(payload.Data);
64+
_flowCtlLogger.Write(payload.Messages);
6565
}
6666
catch (Exception ex)
6767
{

src/FlowCtl/Commands/Plugins/Uninstall/UninstallPluginCommandOptionsHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ private async Task Execute(UninstallPluginCommandOptions options, CancellationTo
5151
if (payload is { Succeeded: false })
5252
_flowCtlLogger.WriteError(payload.Messages);
5353
else
54-
_flowCtlLogger.Write(payload.Data);
54+
_flowCtlLogger.Write(payload.Messages);
5555
}
5656
catch (Exception ex)
5757
{

src/FlowCtl/Commands/Plugins/Update/UpdatePluginCommandOptionsHandler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ private async Task Execute(UpdatePluginCommandOptions options, CancellationToken
5656
if (payload is { Succeeded: false })
5757
_flowCtlLogger.WriteError(payload.Messages);
5858
else
59-
_flowCtlLogger.Write(payload.Data);
59+
_flowCtlLogger.Write(payload.Messages);
6060
}
6161
catch (Exception ex)
6262
{

0 commit comments

Comments
 (0)