[OE-core] [PATCHv2] insane.bbclass: write QA issues to log file only when they are in ERROR_QA or WARN_QA

Richard Purdie richard.purdie at linuxfoundation.org
Mon Aug 21 21:23:17 UTC 2017


On Mon, 2017-08-21 at 23:13 +0200, Martin Jansa wrote:
> > all messages are put into the log but at differing log levels.
> 
> But there aren't the "log levels" in the file (as NOTE, WARN, ERROR)
> now, it writes only P, error message and type of QA check (not the
> selected severity of it, like bb.error, bb.warn, bb.note used in the
> function for normal output).
> 
> See the function above package_qa_handle_error:
> 
> def package_qa_write_error(type, error, d):
>     logfile = d.getVar('QA_LOGFILE')
>     if logfile:
>         p = d.getVar('P')
>         with open(logfile, "a+") as f:
>             f.write("%s: %s [%s]\n" % (p, error, type))
> 

Sorry, I misread your earlier message and assumed it was logging the
level already. I've spent too long staring at bitbake server bugs :/.

I'm still torn on this, I can see why qa.log makes sense to contain all
the qa issues found and then the WARN/ERROR levels filter the console
output (and ultimately the bitbake exit code). I can also see why in
general we'd not want "levels" in the logfile, its more of a console
issue.

You could do "grep -v version-going-backwards qa.log" I guess?

Cheers,

Richard





More information about the Openembedded-core mailing list