ruby on rails - Debugging stuff that lives in lib -


normally, in rails app, writing puts or rails.logger outputs data console. however, reason, when step in code lives in lib, written streams "swallowed" or -- is, doesn't end on stdout! strategies debugging this?

thanks,

you may victim of activesupport::bufferedlogger, buffers log output , flushes when asked to. because you're not asking in lib files (hint: automatically in controllers / models / whatever used in request), won't.

what need tell want wherever need it:

rails.logger.auto_flushing = true 

then can call other rails.logger methods heart's content.


Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -