mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Fix broken lograge logs.
This commit is contained in:
parent
df84e1c358
commit
46f8a6c97d
@ -21,12 +21,19 @@ if (Rails.env.production? && SiteSetting.logging_provider == 'lograge') || ENV["
|
|||||||
|
|
||||||
if data = Thread.current[:_method_profiler]
|
if data = Thread.current[:_method_profiler]
|
||||||
sql = data[:sql]
|
sql = data[:sql]
|
||||||
|
|
||||||
|
if sql
|
||||||
output[:db] = sql[:duration] * 1000
|
output[:db] = sql[:duration] * 1000
|
||||||
output[:db_calls] = sql[:calls]
|
output[:db_calls] = sql[:calls]
|
||||||
|
end
|
||||||
|
|
||||||
redis = data[:redis]
|
redis = data[:redis]
|
||||||
|
|
||||||
|
if redis
|
||||||
output[:redis] = redis[:duration] * 1000
|
output[:redis] = redis[:duration] * 1000
|
||||||
output[:redis_calls] = redis[:calls]
|
output[:redis_calls] = redis[:calls]
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
output
|
output
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user