Skip to content

Refactor: Cleanup Noisy Workflow Logging#6744

Merged
sougou merged 2 commits intovitessio:masterfrom
planetscale:pf-debug-logs-workflow
Sep 22, 2020
Merged

Refactor: Cleanup Noisy Workflow Logging#6744
sougou merged 2 commits intovitessio:masterfrom
planetscale:pf-debug-logs-workflow

Conversation

@PrismaPhonic
Copy link
Copy Markdown
Contributor

This PR cleans up noisy logging related to workflow methods, and moves printing logic up a level so that direct Wrangler method calls aren't printing output intended purely for vtctl command use from a console.

…vel so direct Wrangler method use is less noisy as well.

Signed-off-by: Peter Farr <Peter@PrismaPhonic.com>
Signed-off-by: Peter Farr <Peter@PrismaPhonic.com>
logger := logutil.NewMemoryLogger()
wr := New(logger, env.topoServ, env.tmc)

_, err := wr.ShowWorkflow(ctx, workflow, keyspace)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It will be better to continue to call this but assert on the returned result

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The point of this test though is to check the logger output, which will only exist if we call one level up.

Copy link
Copy Markdown
Member

@rohit-nayak-ps rohit-nayak-ps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@sougou sougou merged commit e4d2296 into vitessio:master Sep 22, 2020
@enisoc enisoc deleted the pf-debug-logs-workflow branch September 22, 2020 16:46
@askdba askdba added this to the v8.0 milestone Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants