by
back

Highlight your logger output on ruby on rails with priscilla

While debugging a ruby app, it is sometimes very useful to print some information to the console to see whether a part of your code is executed or what the value of some variable looks like.
Unfortuately the console is often full of database queries, asset information and runtime stats and its difficult to find your output in the log.

priscilla is a handy little gem that highlights your output and you will never have to search for it...

Gemfile

gem 'priscilla'

Now you can use pr 'hello world' instead of logger.info 'hello world' to output messages to the console.

Priscilla

You can customize the output with decorators pr "Hello world", decorator: "="`

Priscilla with decorators

There are some more options and examples on the github page



comments powered by Disqus