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

Issue 85570044: Hook up the debug-log command line to the API.

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

Description

Hook up the debug-log command line to the API. Have 'juju debug-log' try to use the API first. If that fails, it falls back to tailing the log over ssh. https://code.launchpad.net/~thumper/juju-core/debug-log-api/+merge/215323 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 9
Unified diffs Side-by-side diffs Delta from patch set Stats (+325 lines, -131 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M cmd/args.go View 2 chunks +24 lines, -0 lines 4 comments Download
M cmd/args_test.go View 1 chunk +23 lines, -0 lines 2 comments Download
M cmd/juju/debuglog.go View 2 chunks +94 lines, -61 lines 1 comment Download
M cmd/juju/debuglog_test.go View 1 chunk +149 lines, -56 lines 0 comments Download
M cmd/juju/main.go View 1 chunk +1 line, -1 line 0 comments Download
M errors/errors.go View 1 chunk +22 lines, -0 lines 0 comments Download
M errors/errors_test.go View 2 chunks +6 lines, -0 lines 0 comments Download
M state/api/client.go View 4 chunks +4 lines, -13 lines 2 comments Download

Messages

Total messages: 3
thumper
Please take a look.
10 years ago (2014-04-11 00:27:56 UTC) #1
wallyworld
LGTM, not sure about the need for a different "api not supported" mechanism though. https://codereview.appspot.com/85570044/diff/1/cmd/args.go ...
10 years ago (2014-04-11 00:54:43 UTC) #2
thumper
10 years ago (2014-04-11 01:05:35 UTC) #3
https://codereview.appspot.com/85570044/diff/1/cmd/args.go
File cmd/args.go (right):

https://codereview.appspot.com/85570044/diff/1/cmd/args.go#newcode46
cmd/args.go:46: // f.Var(cmd.NewAppendStringsValue(defaultValue, &someMember),
"name", "help")
On 2014/04/11 00:54:43, wallyworld wrote:
> The above comment is wrong

Done.

https://codereview.appspot.com/85570044/diff/1/cmd/args.go#newcode59
cmd/args.go:59: return fmt.Sprint(*v)
On 2014/04/11 00:54:43, wallyworld wrote:
> Could we do:
> 
> return strings.Join(*v, ",")
> 
> to be consistent with StringsValue

Done.

https://codereview.appspot.com/85570044/diff/1/cmd/args_test.go
File cmd/args_test.go (right):

https://codereview.appspot.com/85570044/diff/1/cmd/args_test.go#newcode161
cmd/args_test.go:161: message:       "no value set by args",
On 2014/04/11 00:54:43, wallyworld wrote:
> I don't understand the message. Shouldn't it be "value set by args"?

yes

https://codereview.appspot.com/85570044/diff/1/state/api/client.go
File state/api/client.go (right):

https://codereview.appspot.com/85570044/diff/1/state/api/client.go#newcode773
state/api/client.go:773: return nil,
errors.NewNotSupportedError("WatchDebugLog")
On 2014/04/11 00:54:43, wallyworld wrote:
> Till now, CodeNotImplemented has been used to flag an incompatible API call.
I'm
> not sure of the value of introducing something new here, instead of just going
> with what's already been done.

Talked with Roger about this last night and we agreed to change it to this.
Sign in to reply to this message.

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