to_s args before trying to slice them

This commit is contained in:
Raphael 2010-12-16 17:55:43 -08:00
parent e7cca604e6
commit bd64cb723f

View file

@ -17,7 +17,7 @@ module ResqueJobLogging
end
log_string += "ms=#{time} "
arg_count = 1
args.each{|arg| log_string += "arg#{arg_count}=\"#{arg[0..30]}\" "}
args.each{|arg| log_string += "arg#{arg_count}=\"#{arg.to_s[0..30]}\" "}
Rails.logger.info(log_string)
raise error if error