2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

Fix broken lograge logs.

This commit is contained in:
Guo Xiang Tan 2017-11-28 14:00:13 +08:00
parent df84e1c358
commit 46f8a6c97d

View file

@ -21,12 +21,19 @@ if (Rails.env.production? && SiteSetting.logging_provider == 'lograge') || ENV["
if data = Thread.current[:_method_profiler]
sql = data[:sql]
if sql
output[:db] = sql[:duration] * 1000
output[:db_calls] = sql[:calls]
end
redis = data[:redis]
if redis
output[:redis] = redis[:duration] * 1000
output[:redis_calls] = redis[:calls]
end
end
output
end