bin/cloud66_agent in cloud66_agent-0.0.1.pre3 vs bin/cloud66_agent in cloud66_agent-0.0.1.pre4

- old
+ new

@@ -41,21 +41,23 @@ opts.on('--log_level LOGLEVEL', 'Log level (int)') do |v| $config.log_level = v.to_i end end.parse! -# prepare the global logger +#pick up the command used +command = ARGV[0].downcase unless ARGV[0].nil? + +# prepare the global logger (can't have stdout logging for job_start command - as the stdout result is used) +$config.log_path = "/var/log/cloud66/cloud66_agent.log" if command == 'job_start' && $config.log_path == STDOUT $logger = Logger.new($config.log_path) $logger.level = $config.log_level if $config.disabled # no other commands allowed while disabled $logger.error "This agent had been disabled. Please contact Cloud 66 if you think this is in error" exit -1 end -#pick up the command used -command = ARGV[0].downcase unless ARGV[0].nil? if command.nil? || command.empty? $logger.debug("Cloud 66 Agent v#{Cloud66::Utils::Version.current} (#{$config.is_agent_configured? ? 'Configured' : 'Not Configured'})") exit 0 end