Re: [python API] logging

"[email protected]" <[email protected]> Sat, 15 Sep 2012 13:29:40 +0200
Newsgroups gmane.linux.rpm.yum
Message-ID <CAD5sFAah+RZ4b1N3Qa1wETXcX0Npth0_bHv9rze0ys4z5Fc3Wg@mail.gmail.com>
On Sat, Sep 15, 2012 at 11:13 AM, Alon Bar-Lev <[email protected]> wrote:

> Thank you Tim!
>
> The requirement is to have log, but have full control where it goes... :)
>
> Disabling the log completely is not something I like, logs are not evil as
> long as I can control the output location and verbosity.
>
> Using this and propagate, I still have the following messages to stdout:
> ---
> warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID
> fd431d51: NOKEY
>
> Importing GPG key 0xFD431D51:
>  Userid : Red Hat, Inc. (release key 2) <[email protected]>
>  Package: redhat-release-server-6Server-6.3.0.3.el6.x86_64
> (@anaconda-RedHatEnterpriseLinux-201206132210.x86_64/6.3)
>  From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
> Importing GPG key 0xFD431D51:
>  Userid : Red Hat, Inc. (release key 2) <[email protected]>
>  Package: redhat-release-server-6Server-6.3.0.3.el6.x86_64
> (@anaconda-RedHatEnterpriseLinux-201206132210.x86_64/6.3)
>  From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
>
> Package qemu-kvm-tools is obsoleted by qemu-kvm-rhev-tools, trying to
> install 2:qemu-kvm-rhev-tools-0.12.1.2-2.295.el6_3.2.x86_64 instead
>
> Freeing read locks for locker 0x5: 1228/139804988552960
> Freeing read locks for locker 0x7: 1228/139804988552960
> Freeing read locks for locker 0x8: 1228/139804988552960
> Freeing read locks for locker 0xf: 1228/139804988552960
> Freeing read locks for locker 0x11: 1228/139804988552960
> Freeing read locks for locker 0x12: 1228/139804988552960
> Freeing read locks for locker 0x13: 1228/139804988552960
> Freeing read locks for locker 0x14: 1228/139804988552960
> Freeing read locks for locker 0x15: 1228/139804988552960
> Freeing read locks for locker 0x16: 1228/139804988552960
> Freeing read locks for locker 0x17: 1228/139804988552960
> Freeing read locks for locker 0x2f: 1228/139804988552960
> Freeing read locks for locker 0x31: 1228/139804988552960
> Freeing read locks for locker 0x32: 1228/139804988552960
>

Looks like it is something written to sys.stdout and not to the logger,
Look like output from rpm
so you need to redirect sys.stdout & sys.stderr to catch all output

http://stackoverflow.com/questions/6796492/python-temporarily-redirect-stdout-stderr

Tim

_______________________________________________
Yum mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum