tp-libvirt icon indicating copy to clipboard operation
tp-libvirt copied to clipboard

Root logger is not avilible to avocado tests after the 92.0 LTS

Open richtja opened this issue 3 years ago • 4 comments

In b2459dd the avocado stopped using the logs from root logger. Every avocado log are under avocado namespace now. This change was already accepted in avocado-vt. With those changes, every avocado-vt test has to use avocado namespace for logging, otherwise the logs will be lost, because the logs to root logger won't be used by avocado output. This is also part of Avocado 92.0 LTS version. As a solution, might be approach from avocado-vt adbfa56

richtja avatar Oct 20 '21 09:10 richtja

I'm updating my script, but @richtja do I understand this correctly, do we now have to add an additional line of boilerplate code to each and every test script - I counted 539 test scripts today only in this libvirt provider - to make sure the logs are not lost?

smitterl avatar Jan 18 '22 12:01 smitterl

Hi @smitterl If those scripts are using the root logger, unfortunately yes the change is necessary, because now the avocado only captures messages from the Avocado namespace context.

richtja avatar Jan 18 '22 13:01 richtja

$ grep -Rl "logging\."|grep ".py"|wc -l
465

smitterl avatar Jan 18 '22 14:01 smitterl

The following is our latest status(update here to inform anyone interested in this issue): updated the existing files in tp-libvirt/libvirt: https://github.com/autotest/tp-libvirt/pull/3994 updated the existing files in tp-libvirt/provider: https://github.com/autotest/tp-libvirt/pull/3995 updated v2v files: https://github.com/autotest/tp-libvirt/pull/3983

Yingshun avatar Jan 19 '22 00:01 Yingshun