Skip to contentSkip to conversation

Why bb.warning output goes to stdout?

DISCUSSION Anton Mikanovich 2 participants 2 messages Oct 28, 2024

lore
Share & tools
lore
#0 lore raw

Hello all,

I've just noticed that bb.warning() API (and also bbwarn FIFO API) output messages to stdout, while warnings are usually goes to stderr. Having warnings in stderr can be useful if using pipes to inform the user about any issues without hiding them. Python logger is also output warnings to stderr.
Is there any reason of bitbake to output warnings to stdout?

#1 lore raw
Quoted 8 lines · Anton Mikanovich via lists.openembedded.org

Hello all,

I've just noticed that bb.warning() API (and also bbwarn FIFO API) output messages to stdout, while warnings are usually goes to stderr. Having warnings in stderr can be useful if using pipes to inform the user about any issues without hiding them. Python logger is also output warnings to stderr.
Is there any reason of bitbake to output warnings to stdout?

It is a good question. Partly history, I think bitbake always did this. Partly that warnings are not fatal and don't cause failure, unlike errors.

It would probably cause disruption to change it now as there are likely things depending on that behaviour.

Cheers,

Richard