Skip to content

Commit 0178cc7

Browse files
colinmollenhourSpComb
authored andcommitted
Change CLI log --tail/follow options to match Docker (kontena#2046)
* Fix log options to match Docker * Alias --tail as --lines to keep compatibility
1 parent 0db3106 commit 0178cc7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cli/lib/kontena/cli/helpers/log_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ module LogHelper
33

44
def self.included(base)
55
if base.respond_to?(:option)
6-
base.option ["-t", "--tail"], :flag, "Tail (follow) logs", default: false
7-
base.option "--lines", "LINES", "Number of lines to show from the end of the logs", default: 100 do |s|
6+
base.option ["-f", "--follow"], :flag, "Follow log output", :attribute_name => :tail, default: false
7+
base.option ['--tail', '--lines'], "LINES", "Number of lines to show from the end of the logs", :attribute_name => :lines, default: 100 do |s|
88
Integer(s)
99
end
1010
base.option "--since", "SINCE", "Show logs since given timestamp"

0 commit comments

Comments
 (0)