This commit is contained in:
David Heinemeier Hansson
2024-09-20 07:58:38 -07:00
parent 384b36d158
commit afa6898a82

View File

@@ -43,9 +43,7 @@ class Kamal::Commands::Proxy < Kamal::Commands::Base
def follow_logs(host:, timestamps: true, grep: nil, grep_options: nil) def follow_logs(host:, timestamps: true, grep: nil, grep_options: nil)
run_over_ssh pipe( run_over_ssh pipe(
docker(:logs, container_name), docker(:logs, container_name, ("--timestamps" if timestamps), "--tail", "10", "--follow", "2>&1"),
("--timestamps" if timestamps),
"--tail", "10", "--follow", "2>&1"),
(%(grep "#{grep}"#{" #{grep_options}" if grep_options}) if grep) (%(grep "#{grep}"#{" #{grep_options}" if grep_options}) if grep)
).join(" "), host: host ).join(" "), host: host
end end