[mythtv] Suppressing debug output in Python bindings
Robin Gilks
g8ecj at gilks.org
Sat Mar 20 23:24:28 UTC 2010
> On 3/20/2010 01:05, Robin Gilks wrote:
>> Since upgrading to trunk it fails due to verbose output of the following
>> form...
>>
>> 2010-03-20 16:54:53.333 Python Database Connection: Using connection
>> settings from /home/mythtv/.mythtv/config.xml
>>
>> Not very helpful when I'm looking for the script to return 'FREE' or
>> 'RECORDING'.
>>
>> Any ideas on how to suppress this output anyone?
>>
>
> The python bindings got a very significant rewrite in trunk, announced
> in this mailing list
> (http://www.gossamer-threads.com/lists/mythtv/dev/415556), and
> documented on the wiki (http://mythtv.org/wiki/Python_bindings). The
> bindings now offer similar logging behavior as the MythTV binaries, with
> the default loglevel being 'important,general'. You can disable all
> logging with the following command.
>
> from MythTV import MythLog
> MythLog._setlevel('none')
Many thanks - I'd already found the logging function when I actually
looked at the code, you have confirmed that I'm using it correctly!!
> Also note that the MythTV class has been renamed to MythBE, and while
> the former remains for backwards compatibility in 0.23, I intend to
> remove it for 0.24. Just change that line to the following, and update
> all uses of the MythTV class.
>
> from MythTV import MythBE
Now that I hadn't sussed out. Changes made, all is good :-)
Cheers
--
Robin Gilks
More information about the mythtv-dev
mailing list