On Sept. 19, 2013, 5:47 a.m., Jan Synacek wrote:
> src/journald/LMI_JournalLogRecordProvider.c, line 175
>
<
http://reviewboard-openlmi.rhcloud.com/r/875/diff/1/?file=4920#file4920li...
>
> 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 ...)
Right, an old habit from sblim provider code...
On Sept. 19, 2013, 5:47 a.m., Jan Synacek wrote:
> src/journald/LMI_JournalLogRecordProvider.c, lines 226-229
>
<
http://reviewboard-openlmi.rhcloud.com/r/875/diff/1/?file=4920#file4920li...
>
> These pieces of code are fairly common throughout the code. Wrap in a macro /
make a function?
Even though I'm not fan of local custom defines as it looks horribly disassociated to
the rest of the code, I admit the current code looks horrible the same way. Moved to macro
for the time being, until I decide it looks horrible again :-)
On Sept. 19, 2013, 5:47 a.m., Jan Synacek wrote:
> src/journald/LMI_JournalLogRecordProvider.c, line 169
>
<
http://reviewboard-openlmi.rhcloud.com/r/875/diff/1/?file=4920#file4920li...
>
> There is a very similar function in the logicalfile provider. Maybe we should
move it to the libcommon.
Good idea, will do that in separate commits. Since my journald branch is not up-to-date
and there were changes in master, I'll need to rebase and align my code first. But
since there are several patches currently on review, let's do this as soon as
they're finished.
On Sept. 19, 2013, 5:47 a.m., Tomáš Bžatek wrote:
> s/fiull/full/ in the description.
Nice catch, thx.
- Tomáš
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard-openlmi.rhcloud.com/r/875/#review1212
-----------------------------------------------------------
On Sept. 18, 2013, 3: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, 3: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