diff --git a/src/SeqCli/Cli/Commands/Forwarder/InstallCommand.cs b/src/SeqCli/Cli/Commands/Forwarder/InstallCommand.cs index 4fc70ed0..3eeda939 100644 --- a/src/SeqCli/Cli/Commands/Forwarder/InstallCommand.cs +++ b/src/SeqCli/Cli/Commands/Forwarder/InstallCommand.cs @@ -33,7 +33,7 @@ namespace Seq.Forwarder.Cli.Commands { - [Command("forwarder", "install", "Install the Seq Forwarder as a Windows service")] + [Command("forwarder", "install", "Install the forwarder as a Windows service")] [SuppressMessage("Interoperability", "CA1416:Validate platform compatibility")] class InstallCommand : Command { diff --git a/src/SeqCli/Cli/Commands/Forwarder/RestartCommand.cs b/src/SeqCli/Cli/Commands/Forwarder/RestartCommand.cs index bf04e666..c53f9b70 100644 --- a/src/SeqCli/Cli/Commands/Forwarder/RestartCommand.cs +++ b/src/SeqCli/Cli/Commands/Forwarder/RestartCommand.cs @@ -26,7 +26,7 @@ namespace Seq.Forwarder.Cli.Commands { - [Command("forwarder", "restart", "Restart the Windows service")] + [Command("forwarder", "restart", "Restart the forwarder Windows service")] [SuppressMessage("Interoperability", "CA1416:Validate platform compatibility")] class RestartCommand : Command { diff --git a/src/SeqCli/Cli/Commands/Forwarder/RunCommand.cs b/src/SeqCli/Cli/Commands/Forwarder/RunCommand.cs index e743f174..3c94225e 100644 --- a/src/SeqCli/Cli/Commands/Forwarder/RunCommand.cs +++ b/src/SeqCli/Cli/Commands/Forwarder/RunCommand.cs @@ -36,7 +36,7 @@ namespace SeqCli.Cli.Commands.Forwarder; -[Command("forwarder", "run", "Run the server interactively")] +[Command("forwarder", "run", "Listen on an HTTP endpoint and forward ingested logs to Seq")] class RunCommand : Command { readonly StoragePathFeature _storagePath; diff --git a/src/SeqCli/Cli/Commands/Forwarder/StartCommand.cs b/src/SeqCli/Cli/Commands/Forwarder/StartCommand.cs index 150c9f6d..5353e142 100644 --- a/src/SeqCli/Cli/Commands/Forwarder/StartCommand.cs +++ b/src/SeqCli/Cli/Commands/Forwarder/StartCommand.cs @@ -24,7 +24,7 @@ namespace Seq.Forwarder.Cli.Commands { - [Command("forwarder", "start", "Start the Windows service")] + [Command("forwarder", "start", "Start the forwarder Windows service")] [SuppressMessage("Interoperability", "CA1416:Validate platform compatibility")] class StartCommand : Command { diff --git a/src/SeqCli/Cli/Commands/Forwarder/StatusCommand.cs b/src/SeqCli/Cli/Commands/Forwarder/StatusCommand.cs index 40b05669..1b0aa06d 100644 --- a/src/SeqCli/Cli/Commands/Forwarder/StatusCommand.cs +++ b/src/SeqCli/Cli/Commands/Forwarder/StatusCommand.cs @@ -24,7 +24,7 @@ namespace Seq.Forwarder.Cli.Commands { - [Command("forwarder", "status", "Show the status of the Seq Forwarder service")] + [Command("forwarder", "status", "Show the status of the forwarder Windows service")] [SuppressMessage("Interoperability", "CA1416:Validate platform compatibility")] class StatusCommand : Command { diff --git a/src/SeqCli/Cli/Commands/Forwarder/StopCommand.cs b/src/SeqCli/Cli/Commands/Forwarder/StopCommand.cs index d5ee2f1a..a003bb22 100644 --- a/src/SeqCli/Cli/Commands/Forwarder/StopCommand.cs +++ b/src/SeqCli/Cli/Commands/Forwarder/StopCommand.cs @@ -24,7 +24,7 @@ namespace Seq.Forwarder.Cli.Commands { - [Command("forwarder", "stop", "Stop the Windows service")] + [Command("forwarder", "stop", "Stop the forwarder Windows service")] [SuppressMessage("Interoperability", "CA1416:Validate platform compatibility")] class StopCommand : Command { diff --git a/src/SeqCli/Cli/Commands/Forwarder/TruncateCommand.cs b/src/SeqCli/Cli/Commands/Forwarder/TruncateCommand.cs index df5130da..c73b37d6 100644 --- a/src/SeqCli/Cli/Commands/Forwarder/TruncateCommand.cs +++ b/src/SeqCli/Cli/Commands/Forwarder/TruncateCommand.cs @@ -20,20 +20,25 @@ namespace SeqCli.Cli.Commands.Forwarder; -[Command("forwarder", "truncate", "Clear the log buffer contents")] +[Command("forwarder", "truncate", "Empty the forwarder's persistent log buffer")] class TruncateCommand : Command { readonly StoragePathFeature _storagePath; + readonly ConfirmFeature _confirm; public TruncateCommand() { _storagePath = Enable(); + _confirm = Enable(); } protected override async Task Run(string[] args) { try { + if (!_confirm.TryConfirm("All data in the forwarder's log buffer will be deleted. This cannot be undone.")) + return 1; + ActiveLogBufferMap.Truncate(_storagePath.BufferPath); return 0; } diff --git a/src/SeqCli/Cli/Commands/Forwarder/UninstallCommand.cs b/src/SeqCli/Cli/Commands/Forwarder/UninstallCommand.cs index 96fbed59..b9a55efa 100644 --- a/src/SeqCli/Cli/Commands/Forwarder/UninstallCommand.cs +++ b/src/SeqCli/Cli/Commands/Forwarder/UninstallCommand.cs @@ -23,7 +23,7 @@ namespace Seq.Forwarder.Cli.Commands { - [Command("forwarder", "uninstall", "Uninstall the Windows service")] + [Command("forwarder", "uninstall", "Uninstall the forwarder Windows service")] class UninstallCommand : Command { protected override Task Run()