log_path = ARGV[1]
# create logger
-log = Logger.new(log_path)
+if log_path.nil? or log_path.empty? then
+ log = Logger.new(STDOUT)
+else
+ log = Logger.new(log_path)
+end
# generate command
cmd = Utils.generate_shell_command(cmd, nil)
logger.info "Downloading #{url}"
if is_remote then
- pid,status = Utils.execute_shell_with_log( "wget #{url} -O #{fullpath} -nv", logger )
+ pid,status = Utils.execute_shell_with_log( "wget #{url} -O #{fullpath} -nv", logger.path )
ret = status.exitstatus != 0 ? false : true
#ret = Utils.execute_shell( "wget #{url} -O #{fullpath} -q")
else