introduce limit parameter

limit parameter allows you to specify a max number of lines that
you want, and will not go above that. It's added to deal with
run away failure conditions in logs which make their use in things
like Elastic Search really problematic, as a run away log can
kill logstash workers.

Change-Id: I25cfa10012060214046da8787eba8832e9eb802a