After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 360927 - Use python logging mode
Use python logging mode
Status: RESOLVED FIXED
Product: LDTP
Classification: Other
Component: ldtp
0.6.x
Other Linux
: Normal normal
: ---
Assigned To: LDTP maintainers
LDTP Development Mailing List
Depends on:
Blocks:
 
 
Reported: 2006-10-09 15:40 UTC by Nagappan Alagappan
Modified: 2006-12-08 05:19 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nagappan Alagappan 2006-10-09 15:40:33 UTC
Use python logging mode instead of default LDTP logging module.
Comment 1 Nagappan Alagappan 2006-10-09 22:17:14 UTC
Peter Parente comment in bug # 345734

The configurability of the standard logging module is desirable for testing
Linux Screen Reader. What we need is a way to interleave output from the screen
reader and dogtail into a single log file, like so:

[dogtail INFO] starting test id #gedit-001
[lsr INFO] File <group>
[lsr INFO] menu item <role>
[lsr INFO] New <item>
[lsr INFO] Ctrl-N <hotkey>
[dogtail INFO] ending test

We do this today by:

1) defining an XML-RPC handler for the logging system
2) running an XML-RPC server that simply dumps messages to a file
3) configuring the logging system in both LSR and dogtail using a logging
config file
4) manually adding logging statements to dogtail scripts

It would be better if dogtail supported the standard logging module for all of
its logging such that the test harness could configure it externally. For
instance, test LSR, we could use an external xmlrpc.conf file to tell the test
system to use our XML-RPC handler, what channels to log, what levels to log at,
etc. With all log calls in dogtail supporting this configuration, we won't have
to manually add references to our logger in dogtail scripts.

This doesn't mean that you have to sacrifice simplicity for configurability.
The default configuration for the logging module could be whatever you
currently have. Plus, you can simply bind the log object info method (debug,
warn, whatever) to the name of the function you currently have for logging
(log(msg) ?).

Here's the code we use in LSR, for your reference.

xmlrpc config file
http://cvs.gnome.org/viewcvs/lsr/test/xmlrpc-log.conf?rev=1.2&view=markup

xmlrpc server
http://cvs.gnome.org/viewcvs/lsr/test/logserver.py?rev=1.1&view=markup

xmlrpc client code
http://cvs.gnome.org/viewcvs/lsr/src/LSRLog.py?rev=1.2&view=markup

/s/dogtail/LDTP/ ;)
Comment 2 Nagappan Alagappan 2006-12-08 05:19:24 UTC
Available as part of LDTP 0.7.0 release.