[Rpm-maint] [rpm-software-management/rpm] Add rpmlogOnce() and rpmlogReset() (PR #3417)
Panu Matilainen
notifications at github.com
Fri Nov 1 07:08:18 UTC 2024
@pmatilai commented on this pull request.
> @@ -412,3 +415,36 @@ void rpmlog (int code, const char *fmt, ...)
exit:
errno = saved_errno;
}
+
+int rpmlogOnce (uint64_t domain, const char * key, int code, const char *fmt, ...)
+{
+ int saved_errno = errno;
+ rpmlogCtx ctx = rpmlogCtxAcquire();
+ int newkey = 0;
+
+ if (ctx) {
+ wrlock lock(ctx->mutex);
Another thing that occurred to me last evening is that technically this should use a mutex of its own - there's no reason to prevent other logging events from proceeding while we filter out other messages. Not that it matters here so just a random remark, not a requirement.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3417#pullrequestreview-2409572741
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/3417/review/2409572741 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20241101/5bc9d95d/attachment.html>
More information about the Rpm-maint
mailing list