Skip to content

Commit 17cb66b

Browse files
committed
fix sponsor.rb logger
1 parent 8b1d7cf commit 17cb66b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/models/sponsor.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ def ads_for(ip)
1515
req.options.timeout = 2 # open/read timeout in seconds
1616
req.options.open_timeout = 1 # connection open timeout in seconds
1717
end
18-
logger.info "sponsor=success seconds=#{"%.2f" % (Time.now - start)}"
18+
Rails.logger.info "sponsor=success seconds=#{"%.2f" % (Time.now - start)}"
1919

2020
JSON.parse(response.body) rescue nil
2121
rescue Faraday::TimeoutError
22-
logger.info "sponsor=timeout seconds=#{"%.2f" % (Time.now - start)}"
22+
Rails.logger.info "sponsor=timeout seconds=#{"%.2f" % (Time.now - start)}"
2323
nil
2424
end
2525

0 commit comments

Comments
 (0)