Add option to skip timestamps on logging output

So it is easier to follow live when you are doing debugging, especially
early days app setup when you are the only user.
This commit is contained in:
David Heinemeier Hansson
2024-09-20 07:42:31 -07:00
parent a4e5dbe5d4
commit 384b36d158
9 changed files with 45 additions and 19 deletions

View File

@@ -77,6 +77,12 @@ class CommandsProxyTest < ActiveSupport::TestCase
new_command.logs(lines: 10).join(" ")
end
test "proxy logs without timestamps" do
assert_equal \
"docker logs kamal-proxy 2>&1",
new_command.logs(timestamps: false).join(" ")
end
test "proxy logs with grep hello!" do
assert_equal \
"docker logs kamal-proxy --timestamps 2>&1 | grep 'hello!'",