From 05494b7861e7883d273d42c30a7bc799c5384873 Mon Sep 17 00:00:00 2001 From: elijah Date: Sat, 2 Feb 2013 01:43:03 -0800 Subject: logging - output of leap command is now additionally sent to --log=FILE command line switch or @log value in Leapfile. --- lib/leap_cli/commands/pre.rb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'lib/leap_cli/commands/pre.rb') 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 @@ -39,6 +44,11 @@ module LeapCli bail! { log :missing, "platform directory '#{Path.platform}'" } end + # + # set log file + # + LeapCli.log_file = global[:log] || LeapCli.leapfile.log + # # load all the nodes everything # -- cgit v1.2.3