Skip to content
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

Let the agent's CLI output be user friendly #245

Closed
Tracked by #241
vikman90 opened this issue Oct 25, 2024 · 1 comment · Fixed by #249
Closed
Tracked by #241

Let the agent's CLI output be user friendly #245

vikman90 opened this issue Oct 25, 2024 · 1 comment · Fixed by #249
Assignees
Labels
level/task Task issue module/agent mvp Minimum Viable Product refinement type/enhancement Enhancement issue

Comments

@vikman90
Copy link
Member

vikman90 commented Oct 25, 2024

Parent Issue: #241

Currently, the agent always prints every output in logging format. This is not user friendly for the CLI.

So, we propose:

  • Set the standard CLI output as normal text (no logging format) via stdout.
  • Use stderr for logs.
    • Do not implement this if this causes side effects in the Systemd service.
  • Avoid printing logs in the CLI, except, maybe, critical errors.
@vikman90 vikman90 added level/task Task issue type/enhancement Enhancement issue phase/mvp module/packages Agent packages module/agent and removed module/packages Agent packages labels Oct 25, 2024
@wazuhci wazuhci moved this to Triage in Release 5.0.0 Oct 25, 2024
@wazuhci wazuhci moved this from Triage to Backlog in Release 5.0.0 Oct 25, 2024
@wazuhci wazuhci moved this from Backlog to In progress in Release 5.0.0 Oct 25, 2024
@aritosteles aritosteles linked a pull request Oct 25, 2024 that will close this issue
1 task
@aritosteles
Copy link
Contributor

aritosteles commented Oct 25, 2024

Update

  • Logs have been redirected to stderror using spdlog::sinks::stderr_color_sink_mt sink. No side effects noticed in Systemd service.
  • Output has been changed to plain text in the one case the agent is expected to be run from the CLI (--register) and when the agent exits because a previous instance is already running. Every other use case is common to agents being run through the CLI and through systemd, so the Log format was kept.

PR is up for review

@wazuhci wazuhci moved this from In progress to Done in Release 5.0.0 Oct 28, 2024
@vikman90 vikman90 added the mvp Minimum Viable Product refinement label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/task Task issue module/agent mvp Minimum Viable Product refinement type/enhancement Enhancement issue
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants