rails activesupport notifications - wrong db runtime value

后端 未结 3 1834
执笔经年
执笔经年 2021-02-20 08:38

I\'m trying to log requests for my REST API application. I\'m using rails notifications for this , like here http://railscasts.com/episodes/249-notifications-in-rails-3

3条回答
  •  逝去的感伤
    2021-02-20 09:02

    UPDATE:

    It's not straightforward and needs some tweak around..

    Not unless you write your own Railtie to hook into this like Active Record, but it's a bit more complex than copying what Active Record has...

    But here's how it does it:

    1) Log Subscriber

    2) Railtie

    3) Controller Runtime

    I hope that you got the hint of how to start getting into it.

    Cheers!

提交回复
热议问题