~dave-cheney/juju-core/124-worker-peergrouper-mock-fix

Viewing all changes in revision 2563.

  • Committer: Tarmac
  • Author(s): Tim Penhey
  • Date: 2014-04-04 04:52:38 UTC
  • mfrom: (2562.1.3 tailer-tweaks)
  • Revision ID: tarmac-20140404045238-d7u8vf41arfm1n3i
[r=thumper] Extend the tailer utility.

When looking at the pyjuju debug-log, there was a replay
function that allowed getting the log from the start.
There was no way to tell the tailer to start from the
beginning of the file.

I changed the meaning of NewTailer to be one that doesn't
do any seeking. The NewTailerBacktrack does seek to the end,
and then goes back a certain number of lines.

There was a bug in the backtrack tailer when zero lines
were passed in. This is fixed and a test added.

The number of lines to look back is now a uint, as negative
values make no sense at all.

https://codereview.appspot.com/84290045/

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: