You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: thread stdout/stderr from cobra through to func-e for Host provider (#7142)
* fix: thread stdout/stderr from cobra through to func-e for Host provider
Fixes an issue where the Host infrastructure provider hardcoded `os.Stdout` when starting Envoy via func-e, bypassing output redirection configured through Cobra commands. This prevented applications like ai-gateway from properly capturing or redirecting Envoy's output when using the Host provider.
The fix threads stdout and stderr writers from Cobra's `cmd.OutOrStdout()` and `cmd.ErrOrStderr()` through the configuration chain to the `runEnvoy` function, which now uses func-e's three writer options: `api.Out()` for func-e status messages, `api.EnvoyOut()` for Envoy stdout, and `api.EnvoyErr()` for Envoy stderr.
Changes:
* Add Stdout and Stderr fields to config.Server struct
* Thread writers from server command through getConfig chain
* Add Stdout and Stderr fields to host.Infra struct
* Update runEnvoy to use i.Stdout/i.Stderr instead of hardcoded os.Stdout
* Add tests for output redirection behavior
Signed-off-by: Adrian Cole <[email protected]>
0 commit comments