diff --git a/cf-admin-bot/src/main/java/org/commonhaus/automation/admin/api/MemberAliasesResource.java b/cf-admin-bot/src/main/java/org/commonhaus/automation/admin/api/MemberAliasesResource.java index e927c6b..f48f801 100644 --- a/cf-admin-bot/src/main/java/org/commonhaus/automation/admin/api/MemberAliasesResource.java +++ b/cf-admin-bot/src/main/java/org/commonhaus/automation/admin/api/MemberAliasesResource.java @@ -23,6 +23,7 @@ import org.commonhaus.automation.admin.github.CommonhausDatastore; import org.commonhaus.automation.admin.github.CommonhausDatastore.UpdateEvent; +import io.quarkus.logging.Log; import io.quarkus.security.Authenticated; @Path("/member/aliases") @@ -49,9 +50,11 @@ public Response getAliases(@DefaultValue("false") @QueryParam("refresh") boolean return Response.status(Response.Status.NOT_FOUND).build(); } if (!user.status().mayHaveEmail()) { + Log.infof("getAliases|%s User is not eligible for email", user.login()); return Response.status(Response.Status.FORBIDDEN).build(); } if (!ctx.validAttestation(ID)) { + Log.errorf("getAliases|%s %s is an invalid attestation id", user.login(), ID); return Response.status(Response.Status.BAD_REQUEST).build(); } diff --git a/cf-admin-bot/src/main/java/org/commonhaus/automation/admin/api/MemberAttestationResource.java b/cf-admin-bot/src/main/java/org/commonhaus/automation/admin/api/MemberAttestationResource.java index cbeb5ab..3ea9c38 100644 --- a/cf-admin-bot/src/main/java/org/commonhaus/automation/admin/api/MemberAttestationResource.java +++ b/cf-admin-bot/src/main/java/org/commonhaus/automation/admin/api/MemberAttestationResource.java @@ -43,6 +43,7 @@ public class MemberAttestationResource { @Produces("application/json") public Response updateAttestation(AttestationPost post) { if (!ctx.validAttestation(post.id())) { + Log.errorf("updateAttestation|%s: %s is an invalid attestation id", session.login(), post.id()); return Response.status(Response.Status.BAD_REQUEST).build(); } try { @@ -75,6 +76,8 @@ public Response updateAttestation(AttestationPost post) { @Produces("application/json") public Response updateAttestations(List postList) { if (postList.stream().anyMatch(x -> !ctx.validAttestation(x.id()))) { + Log.errorf("updateAttestations|%s: Request includes an invalid attestation id", + session.login(), postList.stream().map(AttestationPost::id).toList()); return Response.status(Response.Status.BAD_REQUEST).build(); } diff --git a/cf-admin-bot/src/main/resources/application.properties b/cf-admin-bot/src/main/resources/application.properties index 724507e..2143c80 100644 --- a/cf-admin-bot/src/main/resources/application.properties +++ b/cf-admin-bot/src/main/resources/application.properties @@ -1,9 +1,9 @@ quarkus.log.level=INFO quarkus.log.min-level=TRACE quarkus.log.category."org.commonhaus".level=DEBUG -quarkus.log.category."io.quarkus.oidc".level=DEBUG +quarkus.log.category."io.quarkus.oidc".level=INFO quarkus.log.category."io.quarkiverse".level=TRACE -quarkus.log.category."io.quarkus.cache".level=DEBUG +quarkus.log.category."io.quarkus.cache".level=INFO quarkus.log.category."org.kohsuke.github".level=DEBUG quarkus.log.category."org.kohsuke.github.GitHubClient".level=INFO quarkus.log.category."jdk.event.security".level=WARN