Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1672)

Issue 36540043: utils: added Tailer for tailing of logs in API

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 5 months ago by mue
Modified:
10 years, 4 months ago
Reviewers:
mp+197522, rog
Visibility:
Public.

Description

utils: added Tailer for tailing of logs in API The Tailer is the initial component of the debug logging command of the API. It allows the filtered tailing of any ReaderSeeker. If no filter is passed all lines will be written in the passed Writer, otherwise only those where the filter function returns true. The initial number of lines can also be specified, the filter already works here. So if a File (which is a ReaderSeeker) containes 100 lines, 10 lines are wanted and 5 match to the filter only those 5 lines are returned. https://code.launchpad.net/~themue/juju-core/057-tailer/+merge/197522 (do not edit description out of merge proposal)

Patch Set 1 #

Patch Set 2 : utils: added Tailer for tailing of logs in API #

Total comments: 30

Patch Set 3 : utils: added Tailer for tailing of logs in API #

Total comments: 20

Patch Set 4 : utils: added Tailer for tailing of logs in API #

Total comments: 13

Patch Set 5 : utils: added Tailer for tailing of logs in API #

Total comments: 13

Patch Set 6 : utils: added Tailer for tailing of logs in API #

Total comments: 4

Patch Set 7 : utils: added Tailer for tailing of logs in API #

Unified diffs Side-by-side diffs Delta from patch set Stats (+754 lines, -0 lines) Patch
A [revision details] View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
A utils/tailer/export_test.go View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download
A utils/tailer/tailer.go View 1 2 3 4 5 1 chunk +250 lines, -0 lines 0 comments Download
A utils/tailer/tailer_test.go View 1 2 3 4 5 6 1 chunk +496 lines, -0 lines 0 comments Download

Messages

Total messages: 12
mue
Please take a look.
10 years, 5 months ago (2013-12-03 13:38:17 UTC) #1
mue
Please take a look.
10 years, 5 months ago (2013-12-05 14:16:12 UTC) #2
rog
This is a good start, but I have a few comments and suggestions. I wonder ...
10 years, 5 months ago (2013-12-05 16:20:37 UTC) #3
mue
Please take a look. https://codereview.appspot.com/36540043/diff/20001/utils/tailer.go File utils/tailer.go (right): https://codereview.appspot.com/36540043/diff/20001/utils/tailer.go#newcode30 utils/tailer.go:30: func StartFileTailer(filename string, lines int, ...
10 years, 4 months ago (2013-12-10 12:56:32 UTC) #4
rog
Getting there! A few more thoughts and suggestions below. https://codereview.appspot.com/36540043/diff/40001/utils/tailer/tailer.go File utils/tailer/tailer.go (right): https://codereview.appspot.com/36540043/diff/40001/utils/tailer/tailer.go#newcode41 utils/tailer/tailer.go:41: ...
10 years, 4 months ago (2013-12-10 15:14:24 UTC) #5
mue
Please take a look. https://codereview.appspot.com/36540043/diff/40001/utils/tailer/tailer.go File utils/tailer/tailer.go (right): https://codereview.appspot.com/36540043/diff/40001/utils/tailer/tailer.go#newcode41 utils/tailer/tailer.go:41: // Writer. The reading beginns ...
10 years, 4 months ago (2013-12-11 17:13:05 UTC) #6
rog
Another round of suggestions, with one or two things still to fix. Thanks for bearing ...
10 years, 4 months ago (2013-12-11 18:27:41 UTC) #7
mue
Please take a look. https://codereview.appspot.com/36540043/diff/60001/utils/tailer/tailer.go File utils/tailer/tailer.go (right): https://codereview.appspot.com/36540043/diff/60001/utils/tailer/tailer.go#newcode131 utils/tailer/tailer.go:131: buffer := make([]byte, t.bufsize) On ...
10 years, 4 months ago (2013-12-12 14:15:40 UTC) #8
rog
Another round. Hopefully done after this one! https://codereview.appspot.com/36540043/diff/80001/utils/tailer/tailer.go File utils/tailer/tailer.go (right): https://codereview.appspot.com/36540043/diff/80001/utils/tailer/tailer.go#newcode49 utils/tailer/tailer.go:49: func NewTailer(readSeeker ...
10 years, 4 months ago (2013-12-12 14:46:39 UTC) #9
mue
Please take a look. https://codereview.appspot.com/36540043/diff/80001/utils/tailer/tailer.go File utils/tailer/tailer.go (right): https://codereview.appspot.com/36540043/diff/80001/utils/tailer/tailer.go#newcode49 utils/tailer/tailer.go:49: func NewTailer(readSeeker io.ReadSeeker, writeCloser io.WriteCloser, ...
10 years, 4 months ago (2013-12-13 11:23:12 UTC) #10
rog
LGTM with the tests fixed, thanks! https://codereview.appspot.com/36540043/diff/80001/utils/tailer/tailer_test.go File utils/tailer/tailer_test.go (right): https://codereview.appspot.com/36540043/diff/80001/utils/tailer/tailer_test.go#newcode42 utils/tailer/tailer_test.go:42: data: data[26:29], On ...
10 years, 4 months ago (2013-12-13 12:52:14 UTC) #11
mue
10 years, 4 months ago (2013-12-13 13:25:07 UTC) #12
Please take a look.

https://codereview.appspot.com/36540043/diff/100001/utils/tailer/tailer_test.go
File utils/tailer/tailer_test.go (right):

https://codereview.appspot.com/36540043/diff/100001/utils/tailer/tailer_test....
utils/tailer/tailer_test.go:100: description:           "lines are longer than
buffer size, missing termination of last line",
On 2013/12/13 12:52:14, rog wrote:
> How is the last line missing termination here?

Done.

https://codereview.appspot.com/36540043/diff/100001/utils/tailer/tailer_test....
utils/tailer/tailer_test.go:117: data:                  unterminatedData[0:2],
On 2013/12/13 12:52:14, rog wrote:
> The last line doesn't seem to be missing termination here.

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b