+ if (!req->idAuthentication)
+ yaz_log(log_request, "Auth none");
+ else if (req->idAuthentication->which == Z_IdAuthentication_open)
+ {
+ const char *open = req->idAuthentication->u.open;
+ const char *slash = strchr(open, '/');
+ int len;
+ if (slash)
+ len = slash - open;
+ else
+ len = strlen(open);
+ yaz_log(log_request, "Auth open %.*s", len, open);
+ }
+ else if (req->idAuthentication->which == Z_IdAuthentication_idPass)
+ {
+ const char *user = req->idAuthentication->u.idPass->userId;
+ const char *group = req->idAuthentication->u.idPass->groupId;
+ yaz_log(log_request, "Auth idPass %s %s",
+ user ? user : "-", group ? group : "-");
+ }
+ else if (req->idAuthentication->which
+ == Z_IdAuthentication_anonymous)
+ {
+ yaz_log(log_request, "Auth anonymous");
+ }
+ else
+ {
+ yaz_log(log_request, "Auth other");
+ }
+ }
+ if (log_request)
+ {