Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(657)

Unified Diff: logdog/client/cli/subcommandQuery.go

Issue 2715413002: LogDog: CLI can use stream URLs, fix auth. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « logdog/client/cli/subcommandList.go ('k') | logdog/client/cmd/logdog/main.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: logdog/client/cli/subcommandQuery.go
diff --git a/logdog/client/cli/subcommandQuery.go b/logdog/client/cli/subcommandQuery.go
index 2d4658625396a3e2263d19d3c313d2c64c57302a..6e303ccf0750c29d9f59a7a6585a4a28dd337d6c 100644
--- a/logdog/client/cli/subcommandQuery.go
+++ b/logdog/client/cli/subcommandQuery.go
@@ -11,6 +11,7 @@ import (
"os"
"github.com/luci/luci-go/common/clock/clockflag"
+ "github.com/luci/luci-go/common/errors"
log "github.com/luci/luci-go/common/logging"
"github.com/luci/luci-go/logdog/api/logpb"
"github.com/luci/luci-go/logdog/client/butlerlib/streamproto"
@@ -74,6 +75,12 @@ func (cmd *queryCommandRun) Run(scApp subcommands.Application, args []string, _
return 1
}
+ coord, err := a.coordinatorClient("")
+ if err != nil {
+ errors.Log(a, errors.Annotate(err).Reason("could not create Coordinator client").Err())
+ return 1
+ }
+
// Open our output file, if necessary.
w := io.Writer(nil)
switch cmd.out {
@@ -119,7 +126,7 @@ func (cmd *queryCommandRun) Run(scApp subcommands.Application, args []string, _
tctx, _ := a.timeoutCtx(a)
ierr := error(nil)
- err = a.coord.Query(tctx, project, path, qo, func(s *coordinator.LogStream) bool {
+ err = coord.Query(tctx, project, path, qo, func(s *coordinator.LogStream) bool {
if err := o.emit(s); err != nil {
ierr = err
return false
« no previous file with comments | « logdog/client/cli/subcommandList.go ('k') | logdog/client/cmd/logdog/main.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698