With the application defined logging function, the actual logging is not performed by the library anymore, and the code belongs in the applications.
The public api is changed to require a context object for all operations. Because other library objects store the context pointer internally, only the constructor functions need an explicit context object as a parameter.