答复: [edk2-discuss] lost stderr in console


wenyi,xie
 

Hi, liming,

Yes, my command using 2>&1 to redirect strerr to stdout, and after updating to version 202011 the stderr are not shown in the screen but only written in xxx.log.
According to Laszlo's help and checking the commit log, I find the problem relate to this commit:
https://github.com/tianocore/edk2/commit/01b6090b75922bc72604c334bd3dc331490af3bb

Proc = MakeSubProc(Command, stdout=PIPE, stderr=STDOUT, env=os.environ, cwd=WorkingDir, bufsize=-1, shell=True)

As the stdout and stderr are combined togetherin since the commit, so in version 201903 my command can work, but in version 202011, after this commit merged, it can't work well.

-----邮件原件-----
发件人: gaoliming [mailto:gaoliming@...]
发送时间: 2021年3月25日 9:27
收件人: discuss@edk2.groups.io; xiewenyi (A) <xiewenyi2@...>
主题: 回复: [edk2-discuss] lost stderr in console

Wenyi:
Do you use build command to build your platform and find the message from stderr are not shown in the screen?

Thanks
Liming

-----邮件原件-----
发件人: discuss@edk2.groups.io <discuss@edk2.groups.io> 代表 wenyi,xie via
groups.io
发送时间: 2021年3月17日 11:23
收件人: discuss@edk2.groups.io
主题: [edk2-discuss] lost stderr in console

Hi,everyone,

I used to set makeflags like below,so that only message from stderr
will be shown in console while compiling, and at the same time message
from stderr and stdout will all be saved in xxx.log.
COMMAND MAKEFLAGS= set -eo pipefail && sh xxx.sh 2>&1 >>
${LOG_FILE_DIR}/xxx.log | tee -a ${LOG_FILE_DIR}/xxx.log

But after updating edk2 from 201903 to 202011, the message from stderr
is not shown in console any more. In xxx.log, the message from stderr
and stdout are still saved.
Do anything change in edk2 may affect on it ?