[PATCH] Added a ring buffer log target to store the last N log messages.

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Holger Hans Peter Freyther holger at freyther.de
Wed Feb 27 14:21:38 UTC 2013


On Thu, Feb 21, 2013 at 05:16:29AM +0000, Katerina Barone-Adesi wrote:

Dear Katerina,

thanks for the patch. There was one issue left, I tried to fix it myself,
pushed it and only made it worse. So much for following the process. :)

Your fixed version made "log alarms 2" have be able to hold two entries
but "write terminal" was emitting "log alarms 3". So I have decided to
move the +1/-1 into the loggingrb.c. I have attempted to update the API
docs at the places. Please have another look if I have done it correctly.

For new header files one needs to add them to the include/**Makefile.am
files, otherwise a "make dist" will not package these files. This kind of
error is caught on our jenkins system (which runs make distcheck).

One thing I didn't notice during the review is the usage of assert(). We
are not checking if NDEBUG is in the CPPFLAGS/CFLAGS or not. This is why
I normally come up with my own assertion macro to make sure that the
assertion code is always enabled. It would be nice if you could come up
with a patch to do that. My hint would be to take a look at cocci to do
semantic patching.

The diff between your patch and my fixup attempt is attached to this
emails.

thanks a lot for your contribution
	holger


-------------- next part --------------
A non-text attachment was scrubbed...
Name: logging.diff
Type: text/x-diff
Size: 4259 bytes
Desc: not available
URL: <http://lists.osmocom.org/pipermail/openbsc/attachments/20130227/22f9c9e4/attachment.bin>


More information about the OpenBSC mailing list