mambrus/liblog

Improved filtering

Opened this issue · 0 comments

Logging is also a way of printf debugging. For RT sensitive issues it may very well be the only way to understand an issue, i.e. when time is a factor of the problem itself.

For debugging purposes by enabling LOG_LEVEL=DEBUG, logs can clobber the view (and also slow down execution which in turn may cause ghost issues).

I.e. prevent that too much is logged (by log-probes from every corner of your code), by enabling only what is needed. IOW a finer granularity of control than LOG_LEVEL alone.

LOGX can be used much like linux kernel ftrace probes, by turning specific areas on and off. Thereby leaving the probes in code, but activate them only on demand using filtering.

ftrace does this using chains of rules. Exactly how liblog will leverage on the concept isn't determined as it's needed to consider more use-cases. From deeply embedded with no kernel support, to high-end UN*X based systems with abilities to use collaborating services.

Additional consideration to take into account is also to keep the configuration as low as possible to not prevent incorporation in (especially) resource constrained projects.