Hi everyone,
It's been a while since we've discussed about the logging-mechanisms
within celix. Instead of plain printfs, the preferable way should be to
use a service tracker to pick up the logging service. In terms of code
reuse, it definitely would make sense to have the code located at one
location, which can be shared by several bundles.
My first idea to use celix_log.c/fw_log for that purpose does not seem
to be possible due to locking issue. Hence, I just committed
log_service/public/src/log_helper.c (and an according header file)
offering loghelper_create, _start, _stop, _destroy and of course
_log-functionality which implements a service tracker for the
log_helper. As an example, I integrated this functionality into the
remote_shell bundle. If everyone agrees with this approach, we could
also re-use this in other bundles. What do you think?
Regards,
Bjoern
- common code for log_service tracking Bjoern Petri
-