[packagedb-cli/pkgdb2] Start adding some logging also to the API