mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix examples in ActiveSupport::LogSubscriber docs
[ci skip]
This commit is contained in:
parent
710e0ffc5a
commit
1b402a510a
1 changed files with 3 additions and 3 deletions
|
@ -16,7 +16,7 @@ module ActiveSupport
|
||||||
# module ActiveRecord
|
# module ActiveRecord
|
||||||
# class LogSubscriber < ActiveSupport::LogSubscriber
|
# class LogSubscriber < ActiveSupport::LogSubscriber
|
||||||
# def sql(event)
|
# def sql(event)
|
||||||
# "#{event.payload[:name]} (#{event.duration}) #{event.payload[:sql]}"
|
# info "#{event.payload[:name]} (#{event.duration}) #{event.payload[:sql]}"
|
||||||
# end
|
# end
|
||||||
# end
|
# end
|
||||||
# end
|
# end
|
||||||
|
@ -47,8 +47,8 @@ module ActiveSupport
|
||||||
# if exception
|
# if exception
|
||||||
# exception_object = event.payload[:exception_object]
|
# exception_object = event.payload[:exception_object]
|
||||||
#
|
#
|
||||||
# "[ERROR] #{event.payload[:name]}: #{exception.join(', ')} " \
|
# error "[ERROR] #{event.payload[:name]}: #{exception.join(', ')} " \
|
||||||
# "(#{exception_object.backtrace.first})"
|
# "(#{exception_object.backtrace.first})"
|
||||||
# else
|
# else
|
||||||
# # standard logger code
|
# # standard logger code
|
||||||
# end
|
# end
|
||||||
|
|
Loading…
Reference in a new issue