Review request for OpenLMI Developers.
By Tomáš Bžatek.
Updated Sept. 30, 2013, 4:42 p.m.
Repository:
openlmi-providers
Description
journald: Support writing new records
This change adds ability to report new messages in the journal log.
This is done by the LMI_JournalLogRecord.CreateInstance() method call
taking only CreationClassName, LogCreationClassName, LogName and DataFormat
key properties as mandatory, with no need to specify the MessageTimestamp and
RecordID key properties. The returned instance will contain all the
information with actual RecordID key property of the new record.
As long as sd_journal_send() actually only queues the request, we need
to watch for journal changes in order to find the new record. This is
quite unfortunate as the daemon could be busy and we can't wait forever.
Messages are available immediately usually, a timeout is set to 5 seconds
for the moment.
Record matching is done by comparing the message itself, the origin function
name and PID. This brings sufficient amount of confidence though more
sophisticated approach may be needed in future to ensure fiull uniqueness.
|
Diffs
- src/journald/LMI_JournalLogRecordProvider.c (PRE-CREATION)
- src/journald/instutil.h (PRE-CREATION)
- src/journald/instutil.c (PRE-CREATION)
View Diff
|