Refactor log formatting into classes

* Move all formatting logic into dedicated classes
* Clean up tests
* Make rails4 compatible
* Update README