diff --git a/cmd/lookout-sdk/push.go b/cmd/lookout-sdk/push.go index 2753a73c..d19aaaf5 100644 --- a/cmd/lookout-sdk/push.go +++ b/cmd/lookout-sdk/push.go @@ -4,17 +4,19 @@ import ( "context" "fmt" "io" + "os" "time" "github.com/src-d/lookout" + "github.com/src-d/lookout/provider/json" "github.com/src-d/lookout/server" + "gopkg.in/src-d/lookout-sdk.v0/pb" + uuid "github.com/satori/go.uuid" gocli "gopkg.in/src-d/go-cli.v0" gogit "gopkg.in/src-d/go-git.v4" "gopkg.in/src-d/go-git.v4/plumbing" - log "gopkg.in/src-d/go-log.v1" - "gopkg.in/src-d/lookout-sdk.v0/pb" ) func init() { @@ -59,7 +61,7 @@ func (c *PushCommand) Execute(args []string) error { } srv := server.NewServer(server.Options{ - Poster: &server.LogPoster{Log: log.DefaultLogger}, + Poster: json.NewPoster(os.Stdout), FileGetter: dataHandler.FileGetter, Analyzers: map[string]lookout.Analyzer{ "test-analyzer": lookout.Analyzer{Client: client}, diff --git a/cmd/lookout-sdk/review.go b/cmd/lookout-sdk/review.go index c3a1da52..480221ad 100644 --- a/cmd/lookout-sdk/review.go +++ b/cmd/lookout-sdk/review.go @@ -2,15 +2,17 @@ package main import ( "context" + "os" "time" "github.com/src-d/lookout" + "github.com/src-d/lookout/provider/json" "github.com/src-d/lookout/server" + "gopkg.in/src-d/lookout-sdk.v0/pb" + uuid "github.com/satori/go.uuid" gocli "gopkg.in/src-d/go-cli.v0" - log "gopkg.in/src-d/go-log.v1" - "gopkg.in/src-d/lookout-sdk.v0/pb" ) func init() { @@ -55,7 +57,7 @@ func (c *ReviewCommand) Execute(args []string) error { } srv := server.NewServer(server.Options{ - Poster: &server.LogPoster{Log: log.DefaultLogger}, + Poster: json.NewPoster(os.Stdout), FileGetter: dataHandler.FileGetter, Analyzers: map[string]lookout.Analyzer{ "test-analyzer": lookout.Analyzer{Client: client}, diff --git a/cmd/sdk-test/bblfsh_test.go b/cmd/sdk-test/bblfsh_test.go index acc96103..5d312832 100644 --- a/cmd/sdk-test/bblfsh_test.go +++ b/cmd/sdk-test/bblfsh_test.go @@ -72,7 +72,7 @@ func (suite *BblfshIntegrationSuite) TestReviewUAST() { func (suite *BblfshIntegrationSuite) TestReviewLanguage() { r := suite.RunReview() - suite.GrepTrue(r, `The file has language detected: "Go"`) + suite.GrepTrue(r, `The file has language detected: \"Go\"`) } func (suite *BblfshIntegrationSuite) TestPushNoBblfshError() { @@ -102,7 +102,7 @@ func (suite *BblfshIntegrationSuite) TestPushUAST() { func (suite *BblfshIntegrationSuite) TestPushLanguage() { r := suite.RunPush() - suite.GrepTrue(r, `The file has language detected: "Go"`) + suite.GrepTrue(r, `The file has language detected: \"Go\"`) } func (suite *BblfshIntegrationSuite) TestConnectToDataServer() {