My question is about the possibility of customizing the logging/tracing done by CAF - viz. does the C++ CAF framework allow an application linking with it to customize the logging & tracing done within CAF?
For e.g., CAF writes its logs to log file if logging is enabled during compilation. But if an application wished to integrate the logs/traces generated by CAF with its own logging mechanism(syslog etc), is there any hook provided by CAF to do that?
I went through the CAF logger class, but could not see any such mechanism - the CAF logger class is not derivable, and the set_current_logger() method takes a logger* as input, etc.
Any pointers on how to achieve the above requirement would be appreciated.
Thanks.
is there any hook provided by CAF to do that?
Currently not.
The set_current_logger
function merely sets a thread-local pointer to the actor system logger. However, CAF is very modular and allowing custom logger implementations is actually quite straightforward. I've created a feature request for this on the official GitHub repository. Stay tuned.