lib/sqreen/remote_command.rb in sqreen-alt-1.11.0 vs lib/sqreen/remote_command.rb in sqreen-alt-1.11.1

- old
+ new

@@ -28,11 +28,11 @@ end def process(runner, context_infos = {}) failing = validate_command(runner) return failing if failing - Sqreen.log.debug format('processing command %s', @name) + Sqreen.log.debug { format('processing command %s', @name) } begin output = runner.send(KNOWN_COMMANDS[@name], *@params, context_infos) rescue => e Sqreen::RemoteException.record(e) return { :status => false, :reason => "error: #{e.inspect}" } @@ -44,18 +44,18 @@ res_list = {} return res_list unless commands unless commands.is_a? Array - Sqreen.log.debug format('Wrong commands type %s', commands.class) - Sqreen.log.debug commands.inspect + Sqreen.log.debug { format('Wrong commands type %s', commands.class) } + Sqreen.log.debug { commands.inspect } return res_list end commands.each do |cmd_json| - Sqreen.log.debug cmd_json + Sqreen.log.debug { cmd_json } cmd = RemoteCommand.new(cmd_json) - Sqreen.log.debug cmd.inspect + Sqreen.log.debug { cmd.inspect } uuid = cmd.uuid res_list[uuid] = cmd.process(runner, context_infos) end res_list end @@ -69,15 +69,15 @@ protected def validate_command(runner) unless KNOWN_COMMANDS.include?(@name) msg = format("unknown command name '%s'", @name) - Sqreen.log.debug msg + Sqreen.log.debug { msg } return { :status => false, :reason => msg } end return nil if runner.respond_to?(KNOWN_COMMANDS[@name]) msg = format("not implemented '%s'", @name) - Sqreen.log.debug msg + Sqreen.log.debug { msg } { :status => false, :reason => msg } end def format_output(output) case output