1. 07 3月, 2011 1 次提交
    • D
      Cleaning up some of the logging code · bcb40b85
      Daniel Veillard 提交于
      * src/util/logging.c: fix virLogDumpAllFD() to avoid snprintf, simplify
        the code and provide more useful signal descriptions. Also remove an
        unused variable.
      bcb40b85
  2. 04 3月, 2011 3 次提交
  3. 18 2月, 2011 1 次提交
  4. 11 2月, 2011 1 次提交
    • D
      Imprint all logs with version + package build information · cee61fc2
      Daniel P. Berrange 提交于
      The logging functions are enhanced so that immediately prior to
      the first log message being printed to any output channel, the
      libvirt package version will be printed.
      
      eg
      
       $ LIBVIRT_DEBUG=1 virsh
       18:13:28.013: 17536: info : libvirt version: 0.8.7
       18:13:28.013: 17536: debug : virInitialize:361 : register drivers
       ...
      
      The 'configure' script gains two new arguments which can be
      used as
      
         --with-packager="Fedora Project, x86-01.phx2.fedoraproject.org, 01-27-2011-18:00:10"
         --with-packager-version="1.fc14"
      
      to allow distros to append a custom string with package specific
      data.
      
      The RPM specfile is modified so that it appends the RPM version,
      the build host, the build date and the packager name.
      
      eg
      
       $ LIBVIRT_DEBUG=1 virsh
       18:14:52.086: 17551: info : libvirt version: 0.8.7, package: 1.fc13 (Fedora Project, x86-01.phx2.fedoraproject.org, 01-27-2011-18:00:10)
       18:14:52.086: 17551: debug : virInitialize:361 : register drivers
      
      Thus when distro packagers receive bug reports they can clearly
      see what version was in use, even if the bug reporter mistakenly
      or intentionally lies about version/builds
      
      * src/util/logging.c: Output version data prior to first log message
      * libvirt.spec.in: Include RPM release, date, hostname & packager
      * configure.ac: Add --with-packager & --with-packager-version args
      cee61fc2
  5. 26 1月, 2011 1 次提交
  6. 02 12月, 2010 1 次提交
    • D
      Fix memory leak in logging setup · c846bc9e
      Daniel P. Berrange 提交于
      The logging setup requires const char * strings, but the
      virLogSetFromEnv() strdup's the env variables, thus causing
      a memory leak
      
      * src/util/logging.c: Avoid strdup'ing env variables
      c846bc9e
  7. 23 11月, 2010 1 次提交
    • D
      Include a thread identifier in log messages · 9288c31b
      Daniel P. Berrange 提交于
      To allow messages from different threads to be untangled,
      include an integer thread identifier in log messages.
      
      * src/util/logging.c: Include thread ID
      * src/util/threads.h, src/util/threads.h, src/util/threads-pthread.c:
        Add new virThreadSelfID() function
      * configure.ac: Check for sys/syscall.h
      9288c31b
  8. 10 11月, 2010 1 次提交
    • S
      bye to close(), welcome to VIR_(FORCE_)CLOSE() · 60ae1c34
      Stefan Berger 提交于
      Using automated replacement with sed and editing I have now replaced all
      occurrences of close() with VIR_(FORCE_)CLOSE() except for one, of
      course. Some replacements were straight forward, others I needed to pay
      attention. I hope I payed attention in all the right places... Please
      have a look. This should have at least solved one more double-close
      error.
      60ae1c34
  9. 19 5月, 2010 1 次提交
  10. 10 3月, 2010 1 次提交
  11. 04 2月, 2010 1 次提交
    • C
      Fix log locking problem when using fork() in the library · cd0ef0e0
      Cole Robinson 提交于
      Ad pointed out by Dan Berrange:
      So if some thread in libvirtd is currently executing a logging call,
      while another thread calls virExec(), that other thread no longer
      exists in the child, but its lock is never released. So when the
      child then does virLogReset() it deadlocks.
      
      The only way I see to address this, is for the parent process to call
      virLogLock(), immediately before fork(), and then virLogUnlock()
      afterwards in both parent & child. This will ensure that no other
      thread
      can be holding the lock across fork().
      
      * src/util/logging.[ch] src/libvirt_private.syms: export virLogLock() and
        virLogUnlock()
      * src/util/util.c: lock just before forking and unlock just after - in
        both parent and child.
      cd0ef0e0
  12. 20 1月, 2010 1 次提交
    • J
      logging: confirm that we want to ignore a write error · eb895e74
      Jim Meyering 提交于
      * src/util/logging.c (virLogMessage): Include "ignore-value.h".
      Use it to ignore the return value of safewrite.
      Use STDERR_FILENO, rather than "2".
      * bootstrap (modules): Add ignore-value.
      * gnulib: Update to latest, for ignore-value that is now LGPLv2+.
      eb895e74
  13. 10 12月, 2009 1 次提交
    • M
      Add virBufferFreeAndReset() and replace free() · 1b9d0744
      Matthias Bolte 提交于
      Replace free(virBufferContentAndReset()) with virBufferFreeAndReset().
      Update documentation and replace all remaining calls to free() with
      calls to VIR_FREE(). Also add missing calls to virBufferFreeAndReset()
      and virReportOOMError() in OOM error cases.
      1b9d0744
  14. 11 11月, 2009 1 次提交
    • D
      Various fixes following a code review · 52147a04
      Daniel Veillard 提交于
      * src/libvirt.c src/lxc/lxc_conf.c src/lxc/lxc_container.c
        src/lxc/lxc_controller.c src/node_device/node_device_hal.c
        src/openvz/openvz_conf.c src/qemu/qemu_driver.c
        src/qemu/qemu_monitor_text.c src/remote/remote_driver.c
        src/storage/storage_backend_disk.c src/storage/storage_driver.c
        src/util/logging.c src/xen/sexpr.c src/xen/xend_internal.c
        src/xen/xm_internal.c: Steve Grubb <sgrubb@redhat.com> sent a code
        review and those are the fixes correcting the problems
      52147a04
  15. 08 10月, 2009 1 次提交
    • A
      Add accessors for logging filters and outputs · 01e0e98f
      Amy Griffis 提交于
      When configuring logging settings, keep more information about the
      output destination. Add accessors to retrieve the filter and output
      settings in the original string form; this to be used to set up
      environment for a child process that also logs.
      
      * src/util/logging.[ch]: add virLogGetFilters and virLogGetOutputs
        accessors and modify the internals (including virLogDefineOutput())
        to save the data needed for the accessors
      01e0e98f
  16. 21 9月, 2009 1 次提交
    • D
      Move all shared utility files to src/util/ · 1355e055
      Daniel P. Berrange 提交于
      * src/bridge.c, src/bridge.h, src/buf.c, src/buf.h, src/cgroup.c,
        src/cgroup.h, src/conf.c, src/conf.h, src/event.c, src/event.h,
        src/hash.c, src/hash.h, src/hostusb.c, src/hostusb.h,
        src/iptables.c, src/iptables.h, src/logging.c, src/logging.h,
        src/memory.c, src/memory.h, src/pci.c, src/pci.h, src/qparams.c,
        src/qparams.h, src/stats_linux.c, src/stats_linux.h,
        src/threads-pthread.c, src/threads-pthread.h, src/threads-win32.c,
        src/threads-win32.h, src/threads.c, src/threads.h, src/util.c,
        src/util.h, src/uuid.c, src/uuid.h, src/virterror.c,
        src/virterror_internal.h, src/xml.c, src/xml.h: Move all files
        into src/util/
      * daemon/Makefile.am: Add -Isrc/util/ to build flags
      * src/Makefile.am: Add -Isrc/util/ to build flags and update for
        moved files
      * src/libvirt_private.syms: Export cgroup APIs since they're now
        in util rather than linking directly to drivers
      * src/xen/xs_internal.c: Disable bogus virEventRemoveHandle call
        when built under PROXY
      * proxy/Makefile.am: Update for changed file locations. Remove
        bogus build of event.c
      * tools/Makefile.am, tests/Makefile.am: Add -Isrc/util/ to build flags
      1355e055
  17. 10 9月, 2009 1 次提交
  18. 06 8月, 2009 3 次提交
    • A
      Consolidate code for parsing the logging env · 63fbcc69
      Amy Griffis 提交于
      * src/logging.c src/logging.h src/libvirt_private.syms:
        define new functions virLogSetFromEnv and virLogParseDefaultPriority
      * qemud/qemud.c src/libvirt.c tests/eventtest.c: cleanup to use the
        unified functions
      63fbcc69
    • A
      Several fixes to libvirtd's log setup · 9147bf2a
      Amy Griffis 提交于
      * qemud/qemud.c src/logging.[ch]: Similar as for general libvirt, don't
        convert high priority levels to debug level. Ignore LIBVIRT_LOG_FILTERS
        and LIBVIRT_LOG_OUTPUTS when they're set to the empty string, otherwise
        they can override a valid setting from the config file. Send all
        settings through the parser functions for validation, so that the
        existence of a bad setting doesn't nullify a good setting that should
        have applied -- particularly the default output. Keep the order of
        precedence consistent for all variables between the environment and
        the config file.  Warn when an invalid log level, filter, or output
        is ignored.
      * src/libvirt_private.syms: export internally a few convenience functions
      9147bf2a
    • A
      Tighten libvirt's parsing of logging env · 22a1ec68
      Amy Griffis 提交于
      * src/libvirt.c src/logging.c: Don't convert high priority levels to the
        debug level. Don't parse LIBVIRT_LOG_FILTERS and LIBVIRT_LOG_OUTPUTS
        when they're set to the empty string. Warn when the user specifies an
        invalid value (empty string remains a noop).
      * po/POTFILES.in: src/logging.c now include translatable strings
      22a1ec68
  19. 16 7月, 2009 1 次提交
    • J
      remove all trailing blank lines · 07613d20
      Jim Meyering 提交于
      by running this command:
      git ls-files -z | xargs -0 perl -pi -0777 -e 's/\n\n+$/\n/'
      This is in preparation for a more strict make syntax-check
      rule that will detect trailing blank lines.
      07613d20
  20. 01 7月, 2009 1 次提交
    • D
      Various logging cleanups in code and doc · 2a004db6
      Daniel Veillard 提交于
      * docs/logging.html[.in] qemud/libvirtd.conf qemud/qemud.c
        src/logging.[ch]: cleanup the logging code and docs to remove
        all references to log level 0, cleanup hardcoded values and add
        a default VIR_LOG_DEFAULT value, patch by Amy Griffis
      daniel
      2a004db6
  21. 26 6月, 2009 1 次提交
    • D
      big cleanup of the debug configuration option · 173c230e
      Daniel Veillard 提交于
      * src/Makefile.am src/libvirt.c src/libvirt_private.syms src/logging.c
        src/logging.h src/util.c src/libvirt_debug.syms: big cleanup of
        the debug configuration option and code by Amy Griffis
      daniel
      173c230e
  22. 28 5月, 2009 1 次提交
  23. 21 1月, 2009 1 次提交
  24. 16 1月, 2009 1 次提交
  25. 07 1月, 2009 1 次提交
  26. 23 12月, 2008 1 次提交
  27. 22 12月, 2008 2 次提交
  28. 07 11月, 2008 1 次提交
    • D
      add new logging module, and move existing definitions there · df93e1ee
      Daniel Veillard 提交于
      * src/logging.c src/logging.h proxy/Makefile.am proxy/libvirt_proxy.c
        src/Makefile.am src/cgroup.c src/datatypes.c src/domain_event.c
        src/internal.h src/libvirt.c src/lxc_container.c src/lxc_controller.c
        src/lxc_driver.c src/proxy_internal.c src/qemu_driver.c
        src/remote_internal.c src/storage_backend_disk.c src/util.c
        src/veth.c src/xen_internal.c src/xen_unified.c src/xend_internal.c:
        add new logging module, and move existing definitions there
      Daniel
      df93e1ee
  29. 21 8月, 2008 1 次提交
  30. 11 4月, 2008 1 次提交
  31. 07 12月, 2007 1 次提交
    • R
      Fri Dec 7 14:49:00 UTC 2007 Richard W.M. Jones <rjones@redhat.com> · 0d14fc0c
      Richard W.M. Jones 提交于
      	* src/console.c, src/console.h, src/virsh.c: Disable
      	  text console on Windows.
      	* src/libvirt.c: Use replacement getpass from Gnulib.
      	* src/libvirt.c: Initialize Winsock before use.
      	* src/remote_internal.c: Header file fixes for Windows.
      	  Don't fail if AI_ADDRCONFIG isn't defined.  Disable
      	  unsupported stuff under Windows.
      	* src/uuid.c: ENODATA unavailable on Windows, use EIO instead.
      	* src/virsh.c: No uid_t / getuid on Windows.
      	* src/virsh.c: No O_SYNC on Windows.
      0d14fc0c
  32. 29 1月, 2007 1 次提交
  33. 26 1月, 2007 1 次提交
  34. 19 1月, 2007 1 次提交
  35. 09 11月, 2006 1 次提交