• D
    Allow stack traces to be included with log messages · 54856395
    Daniel P. Berrange 提交于
    Sometimes it is useful to see the callpath for log messages.
    This change enhances the log filter syntax so that stack traces
    can be show by setting '1:+NAME' instead of '1:NAME'.
    
    This results in output like:
    
    2012-05-09 14:18:45.136+0000: 13314: debug : virInitialize:414 : register drivers
    /home/berrange/src/virt/libvirt/src/.libs/libvirt.so.0(virInitialize+0xd6)[0x7f89188ebe86]
    /home/berrange/src/virt/libvirt/tools/.libs/lt-virsh[0x431921]
    /lib64/libc.so.6(__libc_start_main+0xf5)[0x3a21e21735]
    /home/berrange/src/virt/libvirt/tools/.libs/lt-virsh[0x40a279]
    
    2012-05-09 14:18:45.136+0000: 13314: debug : virRegisterDriver:775 : driver=0x7f8918d02760 name=Test
    /home/berrange/src/virt/libvirt/src/.libs/libvirt.so.0(virRegisterDriver+0x6b)[0x7f89188ec717]
    /home/berrange/src/virt/libvirt/src/.libs/libvirt.so.0(+0x11b3ad)[0x7f891891e3ad]
    /home/berrange/src/virt/libvirt/src/.libs/libvirt.so.0(virInitialize+0xf3)[0x7f89188ebea3]
    /home/berrange/src/virt/libvirt/tools/.libs/lt-virsh[0x431921]
    /lib64/libc.so.6(__libc_start_main+0xf5)[0x3a21e21735]
    /home/berrange/src/virt/libvirt/tools/.libs/lt-virsh[0x40a279]
    
    * docs/logging.html.in: Document new syntax
    * configure.ac: Check for execinfo.h
    * src/util/logging.c, src/util/logging.h: Add support for
      stack traces
    * tests/testutils.c: Adapt to API change
    Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
    54856395
testutils.c 19.6 KB