OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/config/initializers/grape_logging.rb

15 lines
489 B

OpenProject::Application.configure do
config.after_initialize do
ActiveSupport::Notifications.subscribe('openproject_grape_logger') do |_, _, _, _, payload|
time = payload[:time]
attributes = {
duration: time[:total],
db: time[:db],
view: time[:view]
}.merge(payload.except(:time))
extended = OpenProject::Logging.extend_payload!(attributes, {})
Rails.logger.info OpenProject::Logging.formatter.call(extended)
end
end
end