Bug 861437 - RFE: logging: Rewrite syslog logging target to be async signal safe & more flexible
RFE: logging: Rewrite syslog logging target to be async signal safe & more fl...
Status: NEW
Product: Virtualization Tools
Classification: Community
Component: libvirt (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Libvirt Maintainers
Depends On:
  Show dependency treegraph
Reported: 2012-09-28 11:30 EDT by Daniel Berrange
Modified: 2016-04-01 13:55 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Daniel Berrange 2012-09-28 11:30:02 EDT
Description of problem:
The current libvirt logging code support for outputting syslog, just uses the regular C library syslog() function. The problem is that this function is not async signal safe, mostly because of its use of the sprintf family of functions internally. Annoyingly libvirt does not even need printf support here, because it has already expanded the log message string.

Secondary problems are that syslog() only logs to a local syslog service. It might be desirable to let it log directly to a remote syslog over TCP or UDP.

The syslog protocol is very straightforward, so the use of syslog() could easily be replaced by direct sockets calls. The Perl Sys::Syslog module is a good reference for the ever so slightly varying requirements of each OS

Version-Release number of selected component (if applicable):
Comment 1 Cole Robinson 2016-03-23 18:50:41 EDT
Dan was this ever addressed, even indirectly? I still see syslog() calls in the code...
Comment 2 Daniel Berrange 2016-03-29 05:05:57 EDT
No, we've not addressed it yet

Note You need to log in before you can comment on or make changes to this bug.