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

Issue 13690043: Add the api server parts for the logger worker.

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 7 months ago by thumper
Modified:
10 years, 7 months ago
Reviewers:
wallyworld, mp+185401
Visibility:
Public.

Description

Add the api server parts for the logger worker. There are two things this needs to do: watch the environment to see if the logging config changes, and return the logging config for agents. I kept the mutliple entities option on the server side as it may be used by the Juju GUI. https://code.launchpad.net/~thumper/juju-core/logger-api-server/+merge/185401 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 10
Unified diffs Side-by-side diffs Delta from patch set Stats (+271 lines, -0 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
A state/apiserver/logger/logger.go View 1 chunk +91 lines, -0 lines 6 comments Download
A state/apiserver/logger/logger_test.go View 1 chunk +153 lines, -0 lines 4 comments Download
A state/apiserver/logger/package_test.go View 1 chunk +14 lines, -0 lines 0 comments Download
M state/apiserver/root.go View 2 chunks +11 lines, -0 lines 0 comments Download

Messages

Total messages: 3
thumper
Please take a look.
10 years, 7 months ago (2013-09-13 01:59:47 UTC) #1
wallyworld
LGTM with the test issue fixed for TestWatchLoggingConfig https://codereview.appspot.com/13690043/diff/1/state/apiserver/logger/logger.go File state/apiserver/logger/logger.go (right): https://codereview.appspot.com/13690043/diff/1/state/apiserver/logger/logger.go#newcode44 state/apiserver/logger/logger.go:44: var ...
10 years, 7 months ago (2013-09-13 02:16:38 UTC) #2
thumper
10 years, 7 months ago (2013-09-13 03:45:52 UTC) #3
https://codereview.appspot.com/13690043/diff/1/state/apiserver/logger/logger.go
File state/apiserver/logger/logger.go (right):

https://codereview.appspot.com/13690043/diff/1/state/apiserver/logger/logger....
state/apiserver/logger/logger.go:44: var _ Logger = (*LoggerAPI)(nil)
On 2013/09/13 02:16:38, wallyworld wrote:
> I'd like to see this and the above struct moved to the top, just beneath the
> interface definition so they are all together. Just a suggestion.

Done.

https://codereview.appspot.com/13690043/diff/1/state/apiserver/logger/logger....
state/apiserver/logger/logger.go:46: // WatchLoggingConfig starts a watcher to
track changes to the logging config.
On 2013/09/13 02:16:38, wallyworld wrote:
> "to the logging config for the agents specified."

Done.

https://codereview.appspot.com/13690043/diff/1/state/apiserver/logger/logger....
state/apiserver/logger/logger.go:76: // from state.
On 2013/09/13 02:16:38, wallyworld wrote:
> really? why not exit early?

Early exit added and unfunny comment removed.

https://codereview.appspot.com/13690043/diff/1/state/apiserver/logger/logger_...
File state/apiserver/logger/logger_test.go (right):

https://codereview.appspot.com/13690043/diff/1/state/apiserver/logger/logger_...
state/apiserver/logger/logger_test.go:50: c.Assert(err, gc.IsNil)
On 2013/09/13 02:16:38, wallyworld wrote:
> Not part of this work I know, but surely there's a common set up test function
> for these sorts of api tests. This looks like cut and paste boilerplate

Yes there should be, but there isn't.  And a little out of scope for this
branch.

https://codereview.appspot.com/13690043/diff/1/state/apiserver/logger/logger_...
state/apiserver/logger/logger_test.go:109: statetesting.AssertStop(c, w)
On 2013/09/13 02:16:38, wallyworld wrote:
> Can we test the content of the change to ensure it matches what has been set

Nope, because it doesn't tell us.
Sign in to reply to this message.

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