add support for log messages from C