aboutsummaryrefslogtreecommitdiff
path: root/lib/leap_cli/commands/pre.rb
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2013-02-02 01:43:03 -0800
committerelijah <elijah@riseup.net>2013-02-02 01:43:03 -0800
commit05494b7861e7883d273d42c30a7bc799c5384873 (patch)
tree32fc8776a0e25ff257e423ac4e0b4f61abc7cf6c /lib/leap_cli/commands/pre.rb
parentd0247e01c08cf2ce0fefb5808f11c824b681d61f (diff)
downloadleap_cli-05494b7861e7883d273d42c30a7bc799c5384873.tar.gz
leap_cli-05494b7861e7883d273d42c30a7bc799c5384873.tar.bz2
logging - output of leap command is now additionally sent to --log=FILE command line switch or @log value in Leapfile.
Diffstat (limited to 'lib/leap_cli/commands/pre.rb')
-rw-r--r--lib/leap_cli/commands/pre.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/leap_cli/commands/pre.rb b/lib/leap_cli/commands/pre.rb
index 346814b..26dce40 100644
--- a/lib/leap_cli/commands/pre.rb
+++ b/lib/leap_cli/commands/pre.rb
@@ -6,10 +6,15 @@ module LeapCli
module Commands
desc 'Verbosity level 0..2'
- arg_name 'level'
+ arg_name 'LEVEL'
default_value '1'
flag [:v, :verbose]
+ desc 'Override default log file'
+ arg_name 'FILE'
+ default_value nil
+ flag :log
+
desc 'Display version number and exit'
switch :version, :negatable => false
@@ -40,6 +45,11 @@ module LeapCli
end
#
+ # set log file
+ #
+ LeapCli.log_file = global[:log] || LeapCli.leapfile.log
+
+ #
# load all the nodes everything
#
manager