错误信息打印到日志

This commit is contained in:
guange 2016-04-08 14:38:23 +08:00
parent ce611bc725
commit 5241dddca2
1 changed files with 1 additions and 1 deletions

View File

@ -7,7 +7,7 @@ module Mobile
@app.call(@env)
rescue =>e
message = {status: 1, message: e.message }.to_json
puts(e.backtrace.join("\n")) if Rails.env.development?
Rails.logger.error e
status = 200
headers = { 'Content-Type' => content_type }
Rack::Response.new([message], status, headers).finish