Add block support to pipe()

The pipe method now accepts a block, to which it passes 2 arguments:
  * The line of text being logged
  * The log level of the line

Tests for piping are also present.