Re: RFC[1/2] Common logging infrastructure and API

Chereau, Fabien <fabien.chereau@...>


-----Original Message-----
From: Tomasz Bursztyka [mailto:tomasz.bursztyka(a)]
Sent: Tuesday, March 1, 2016 16:55
To: devel(a)
Subject: [devel] Re: Re: Re: Re: Re: RFC[1/2] Common logging infrastructure
and API

Hi Luiz,

- Another feature which is critical for Curie, is the support of multi-core
logging. One core is the master outputting the log on the log_backend while
other slaves cores send their logs to the master using an IPC mechanism.
Each log message carries the information from which core it originates, + a
unified timestamp.
-1, this depends on the hardware architecture besides one can write a
driver to just proxy the logs.
I don't see anything we could do about that in this logging API.
If there is something to be done, let's see it in another patch.
Indeed, my point was just to make sure at API level that such custom implementations are pluggable.

- Finally, another important feature we implemented is the buffering of
incoming logs in a circular buffer in RAM (on both master and slave). This
allow very short log time to avoid delaying the caller of the log function. The
logs are finally output on the log backend in a low priority task, which reads
from the circular buffer. In case there are too many incoming logs, some logs
are lost instead of blocking the program execution.
Provided the message order is keep that is probably ok, but if we do
add the timestamp support then it needs to be before it enters these
buffers. Anyway we may add timestamp support for net_buf at some
point. Btw, having it as a task probably limits this to microkernel
only doesn't it?
Nanokernel could get it, it would run in low prio fiber and that's it.

Imo, let's not bother fixing this right now in this API. This goes separately.
(as I said, instead of having printk/printf we could have a new
sys_log() functions that could act
as a log buffering proxy, fully optional etc...)


Join to automatically receive all group messages.