mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 09:10:25 +08:00
Fix broken lograge logs.
This commit is contained in:
parent
df84e1c358
commit
46f8a6c97d
1 changed files with 11 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue