Bug 861437 - RFE: logging: Rewrite syslog logging target to be async signal safe & more flexible
Summary: RFE: logging: Rewrite syslog logging target to be async signal safe & more fl...
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libvirt
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Libvirt Maintainers
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-28 15:30 UTC by Daniel Berrangé
Modified: 2020-04-15 13:38 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-15 13:38:10 UTC
Embargoed:


Attachments (Terms of Use)

Description Daniel Berrangé 2012-09-28 15:30:02 UTC
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):
0.10.2

Comment 1 Cole Robinson 2016-03-23 22:50:41 UTC
Dan was this ever addressed, even indirectly? I still see syslog() calls in the code...

Comment 2 Daniel Berrangé 2016-03-29 09:05:57 UTC
No, we've not addressed it yet

Comment 4 Daniel Berrangé 2020-04-15 13:38:10 UTC
Re-filed at https://gitlab.com/libvirt/libvirt/-/issues/5


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