-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to redirect devserver stdout/stderr to a file #1452
Conversation
Add a `StdoutLogFile` option to `DevServerOptions` that if it's not "" will redirect the spawned server stdout and stderr to this file.
testsuite/devserver.go
Outdated
@@ -77,6 +77,8 @@ type DevServerOptions struct { | |||
LogLevel string | |||
// Additional arguments to the dev server. | |||
ExtraArgs []string | |||
// Where to redirect stdout and stderr, if empty they will be redirected to the current process. | |||
StdoutLogFile string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
StdoutLogFile string | |
Stdout io.Writer | |
Stderr io.Writer |
This is a more flexible approach, the caller can provide a file if they want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, will update the PR soon-ish. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, will let @Quinn-With-Two-Ns take a peek
Thanks! |
Thanks @cretz ! Can you guestimate when you're going to tag a new version? |
@Quinn-With-Two-Ns what's the policy around when to cut a new version? Thanks |
No functional change in AK, but: - New Temporal SDK (ENG-820) - includes Miki's temporalio/sdk-go#1452 (follow-up in separate PR) - Many proto & test changes due to newly-working Buf validation checks in messages and services (which were silently violated until now) - Removed usage of `shortuuid` (replaced with a TypeID without a prefix) - Replaced direct usage of YAML v2 parsing with v3 Follow-up in separate PRs: - ENG-1024 - ENG-1026 - ENG-1027
Add a
Stdout
andStderr
options toDevServerOptions
that if it's notnil
will redirect the spawned server stdout and stderr to them.What was changed
Option to redirect devserver stdout/stderr to different streams.
Add a
Stdout
andStderr
options toDevServerOptions
that if it's notnil
will redirect the spawned server stdout and stderr to this file.
Why?
We're embedding the dev server in out app, and when we close it we get huge amount of logs from the underlying dev server.
Checklist
Closes
How was this tested:
Ran the current tests.
Maybe https://docs.temporal.io/dev-guide/go/testing, not sure.