Fix broken lograge logs.
This commit is contained in:
parent
df84e1c358
commit
46f8a6c97d
|
@ -21,11 +21,18 @@ if (Rails.env.production? && SiteSetting.logging_provider == 'lograge') || ENV["
|
|||
|
||||
if data = Thread.current[:_method_profiler]
|
||||
sql = data[:sql]
|
||||
output[:db] = sql[:duration] * 1000
|
||||
output[:db_calls] = sql[:calls]
|
||||
|
||||
if sql
|
||||
output[:db] = sql[:duration] * 1000
|
||||
output[:db_calls] = sql[:calls]
|
||||
end
|
||||
|
||||
redis = data[:redis]
|
||||
output[:redis] = redis[:duration] * 1000
|
||||
output[:redis_calls] = redis[:calls]
|
||||
|
||||
if redis
|
||||
output[:redis] = redis[:duration] * 1000
|
||||
output[:redis_calls] = redis[:calls]
|
||||
end
|
||||
end
|
||||
|
||||
output
|
||||
|
|
Loading…
Reference in New Issue