lograge
lograge copied to clipboard
Add halted_callback to the log output
Fix https://github.com/roidrage/lograge/issues/258
Sometimes when you do the final render or redirection, it can be halted by a controller callback. With the existing code, it can very hard to understand where it stopped.
With this commit, the intent is to provide the method name where it stops.
I have only one rubocop offense:
lib/lograge/log_subscriber.rb:8:3: C: Class has too many lines. [102/100]
class RequestLogSubscriber < ActiveSupport::LogSubscriber ...
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32 files inspected, 1 offense detected
RuboCop failed!
What could I do? Extract all logic of extract_runtimes, extract_location, extract_unpermitted_paramsandextract_halted_callbackinto separateclass`?
We are using this on production since the PR without any issue.
@benoittgt could you rebase on master so CI runs?
@benoittgt would be great if you could rebase on master if you have time, thank you!
Sorry, actually I ended up doing it myself here https://github.com/roidrage/lograge/pull/373
For now it won't work for every case so need to figure this out first, and merging this PR is not yet possible
@jeremybdk could you submit a new PR which doesn't have a master conflict?
This should do it. https://github.com/roidrage/lograge/pull/375