Add support for a logging callback.  Untested and no logs are generated yet.