Wednesday, August 26, 2020

Puts Debuggerer v0.10.0 with Logger/Logging support

puts_debuggerer v0.10.0 (debugger-less debugging FTW Ruby gem) is out with the following changes:

  • Support `require 'pd`' as a shorter alternative to `require 'puts_debuggerer'`
  • `require 'awesome_print'` only happens if `printer` option is set to `:ap` or `:awesome_print`
  • Support `printer` as a Logger object or Logging::Logger (from "logging" gem).
  • Set logger formatter to PutsDebuggerer::LOGGER_FORMATTER_DECORATOR when passing as printer (keeping format the same, but decorating msg with pd)
  • Support logging gem logger and Decorate logger layout with PutsDebuggerer::LOGGING_LAYOUT_DECORATOR for logging gem
  • Support `printer: false` option to return rendered String instead of printing and returning object
  • Add `#pd_inspect` (and `#pdi` alias) Kernel core extension methods

Happy puts_debuggerering!

No comments: