[Yum-devel] Making yum quiet - yum.logginglevels.setDebugLevel(0) seemingly not working...

Seth Vidal skvidal at fedoraproject.org
Thu Jun 11 15:18:58 UTC 2009



On Thu, 11 Jun 2009, MacCana, Mike \(London\) wrote:

> Hi folks,
>  
> I'm installing a few packages using yum.YumBase.install in a postinstall. From the module docs, I gather setDebugLevel(0)
> should be the equivalent of a yum '--quiet', but alas, the following code...
>  
> def install():
>     yb = yum.YumBase()
>    
>     yum.logginglevels.setDebugLevel(0)
>     yum.logginglevels.setErrorLevel(0)
>     
>     yb.install(name='zlib-devel')
>     yb.resolveDeps()
>     yb.processTransaction()
>     print('success\n')
>  
> install()
> ...still prints output like this...
>  
> Installing: zlib-devel-1.2.3-3.i386 9676/255692 [1/2]
> Installing: zlib-devel-1.2.3-3.i386 75344/255692 [1/2]
> Installing: zlib-devel-1.2.3-3.i386 75996/255692 [1/2]
> etc.
>  
> What am I missing? Pointers to docs more than welcome, and thanks.


the debuglevel is for for yum cli output callbacks. You're not using 
those- so you're getting the default callbacks.

-sv


More information about the Yum-devel mailing list