shunping commented on code in PR #39288:
URL: https://github.com/apache/beam/pull/39288#discussion_r3679415243


##########
sdks/python/container/boot.go:
##########
@@ -580,10 +581,13 @@ func logRuntimeDependencies(ctx context.Context, 
bufLogger *tools.BufferedLogger
        }
        bufLogger.Printf(ctx, "Dependencies in %s:", phase)
        args = []string{"-m", "pip", "freeze", "--all"}
-       if err := execx.ExecuteEnvWithIO(nil, os.Stdin, bufLogger, bufLogger, 
pythonVersion, args...); err != nil {
+
+       var stdout bytes.Buffer
+       if err := execx.ExecuteEnvWithIO(nil, os.Stdin, &stdout, bufLogger, 
pythonVersion, args...); err != nil {

Review Comment:
   This is a good AI summary after all BufferedLogger references are reviewed:
   
   - `Write` API (`func (b *BufferedLogger) Write(p []byte) (int, error)`): 
Implements `io.Writer`. Buffers byte streams line-by-line into memory and 
flushes periodically or upon calling `FlushAtError(ctx)` / `FlushAtDebug(ctx)`. 
Used primarily to redirect `stdout`/`stderr` of subprocesses or standard Go log 
output.
   
   - `Print` API (`func (b *BufferedLogger) Printf(ctx context.Context, format 
string, args ...any)`): Directly writes formatted messages to the underlying 
logger/service, bypassing line buffering.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to