Hello!

I've just pushed some experimental code to a "doxygen" branch on
moblin.org:

commit 7d9ecc9316d12412cc72c1c41a0889dbeeeb06a2
Author: Patrick Ohly <patrick.o...@intel.com>
Date:   Tue May 11 14:12:42 2010 +0200

    log call location of debug messages
    
    For someone unfamiliar with the source code, it is sometimes hard
    to locate the code which produced a certain message. This patch
    solves this issue like this:
    - produce a fully cross-referenced HTML version of the source
      with Doxygen
    - extend the logging functions and macros so that each message
      comes with file name, line number and function name information
    - turn the time stamp in the HTML output into a link to the source
      code line, with the function name as title
    
    The reason for picking the time stamp was that making other text a
    link would interfere with the visual markup of it (color, bold, etc.).
    
    In such an enriched log one can:
    - hover over the time stamp to see function name in a bubble help
      and the URL (and thus source code location) at the bottom of the
      browser window (at least in Firefox)
    - click on the time stamp to jump to the source code
    
    Because this feature makes both the library and the logs larger,
    it is turned off by default. Configure with --enable-debug-logs
    to enable it when using autotools. Macro tricks are used to
    produce the same code as before when the feature is off.
    
    Limitations:
    - Without time stamp logging, no links are recorded.
    - Each change in the Synthesis source code forces a complete
      new run of Doxygen. This makes compilation quite a bit slower,
      but the only alternative would be to accept that logs and source dump
      are inconsistent in the changed parts.
    - The links contain the absolute file path (making it a bit harder
      to share logs and source code dumps).
    - The TClientEngineInterface::debugPuts() API introduced for and used
      by SyncEvolution leads to links which contain the wrong absolute
      path to the Doxygen HTML files (inside libsynthesis instead of
      SyncEvolution).
    - The "prefix" parameter in that same API is still ignored.

You can an example of an extended log and the corresponding Doxygen
files here:
http://downloads.syncevolution.org/tmp/synthesis-html.tar.gz

Unpack it in /tmp, then point your web browser to
file:///tmp/home/pohly/.cache/syncevolution/scheduleworld...@client_+test_+1-2010-05-11-14-04/syncevolution-log.html

Is that something that would be acceptable for core libsynthesis? I find
it useful as it is, despite the limitations.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.



_______________________________________________
os-libsynthesis mailing list
os-libsynthesis@synthesis.ch
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis

Reply via email to