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


Saucedo Tejada, Genaro <genaro.saucedo.tejada@...>
 

On Wed, 2016-03-02 at 11:08 -0500, Benjamin Walsh wrote:
FYI, in thunderdome we have also created a log system solving some
of
the problems you mention in your RFC. Here are my 2 cents following
our experience:

 - In our implementation we now support only a global log level
(INFO,
 WARNING, ERROR) + a special DEBUG level which is activated at
compile
 time for each module separately. Originally we also had a log
level
 per module but it quickly proved to be mostly unused by the users,
 while adding some complexity (conflicts between global log levels
and
 per module log level), so we removed it, also to save space.
Maybe it did not come clear in my reply, but what I proposed did not
have a global logging level, or rather, the global level is always
"OFF". Each subsystem that you want to log has to enable it, with
their
own level. I think that would give a good control on the verbosity.

Regards,
Ben
This could be implemented without a "global" category but providing an
menu option to rise log level of every category lower than user input.

Currently I have a "default" log level to deal with modules use log but
don't define a module switch, it's not clear yet whether logging.h
should enforce specification of module switch or not.

Join devel@lists.zephyrproject.org to automatically receive all group messages.