kamal icon indicating copy to clipboard operation
kamal copied to clipboard

Follow logs on primary role by default

Open jeromedalbert opened this issue 1 year ago • 0 comments

Problem

kamal app logs -f doesn't work if the primary role is not "web".

Steps to repro:

  • have primary_role: worker in config/deploy.yml
  • run kamal app logs -f

Actual behavior:

  INFO Following logs on [REDACTED_IP]...
  ERROR (ArgumentError): No --roles match for web

Expected behavior: kamal app logs -f should follow logs on the primary role; in this case "worker".

Solution

Do not default kamal app logs -f to use the hardcoded "web" role; instead use the primary role, which can be different from "web".

jeromedalbert avatar Oct 01 '24 20:10 jeromedalbert