dogtail-devel [Bug 345734] Should Dogtail use the standard PEP282 logging module rather than define its own



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=345734

  dogtail | Framework | Ver: CVS HEAD


Peter Parente changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |parente cs unc edu,
                   |                            |gk4 austin ibm com




------- Comment #2 from Peter Parente  2006-10-09 19:28 UTC -------
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


-- 
Configure bugmail: http://bugzilla.gnome.org/userprefs.cgi?tab=email



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]