Add logging to the top level of pkgdb
Log exception using logging in the internal API