This makes it significantly easier to debug database behavior for parts of a spec. Without this, you need to use the DATABASE_LOGGER_LEVEL environment variable, which turns on query logging for everything, making it significantly more difficult to focus on what you are trying to debug. To use this, inside the spec, wrap the code you want in the log method: ```ruby it "should do something" do setup_code log do code_you_are_trying_to_debug end # ... end ```
1.8 KiB
1.8 KiB