st0012/ruby_tracer

Avoid flooding stdout

st0012 opened this issue · 0 comments

When tracing Rails/ActiveRecord related objects, it's easy to generate hundreds or even few thousand entries.

And most of the time, it means:

  • The code execution becomes very slow because of message printing
  • The output is basically useless anyway

So ideally, tracers should be smart enough to:

  1. Stop omitting logs to stdout when reaching a threshold (100?)
  2. Tell users a better alternative, such us:
    • Directing output to a file and open it/perform search inside an editor
    • Applying/updating filtering pattern