[LDTP-Dev] [Bug 360927] Use python logging mode
LDTP (bugzilla.gnome.org)
bugzilla-daemon at bugzilla.gnome.org
Mon Oct 9 15:18:07 PDT 2006
Do not reply to this via email (we are currently unable to handle email
responses and they get discarded). You can add comments to this bug at
http://bugzilla.gnome.org/show_bug.cgi?id=360927
LDTP | ldtp | Ver: 0.6.x
Nagappan changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |parente at cs.unc.edu,
| |gk4 at austin.ibm.com
------- Comment #1 from Nagappan 2006-10-09 22:17 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/ ;)
--
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email
More information about the LDTP-dev
mailing list