Review Request 875: journald: Support writing new records
Jan Synacek
reviewboard at gallagherhome.com
Thu Sep 19 05:46:53 UTC 2013
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard-openlmi.rhcloud.com/r/875/#review1212
-----------------------------------------------------------
src/journald/LMI_JournalLogRecordProvider.c
<http://reviewboard-openlmi.rhcloud.com/r/875/#comment750>
There is a very similar function in the logicalfile provider. Maybe we should move it to the libcommon.
src/journald/LMI_JournalLogRecordProvider.c
<http://reviewboard-openlmi.rhcloud.com/r/875/#comment749>
My gut feeling here is that it's better to check for the rc than for the message.
if (rc.rc ...)
or more explicit and readable
ir (rc.rc != CMPI_RC_OK ...)
src/journald/LMI_JournalLogRecordProvider.c
<http://reviewboard-openlmi.rhcloud.com/r/875/#comment751>
These pieces of code are fairly common throughout the code. Wrap in a macro / make a function?
s/fiull/full/ in the description.
- Jan Synacek
On Sept. 18, 2013, 5:22 p.m., Tomáš Bžatek wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard-openlmi.rhcloud.com/r/875/
> -----------------------------------------------------------
>
> (Updated Sept. 18, 2013, 5:22 p.m.)
>
>
> Review request for OpenLMI Developers.
>
>
> 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
>
> Diff: http://reviewboard-openlmi.rhcloud.com/r/875/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Tomáš Bžatek
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fedorahosted.org/pipermail/openlmi-devel/attachments/20130919/f89b030d/attachment-0001.html>
-------------- next part --------------
_______________________________________________
openlmi-reviews mailing list
openlmi-reviews at lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/openlmi-reviews
More information about the openlmi-devel
mailing list