[Logging] : Log less page details when making an unauthorized GraphQL request for a working page (edit mode)
Parent Issue
No response
Problem Statement
We are logging too much information about a page when making a GraphQL request for a working page (edit mode) without authentication.
Steps to Reproduce
- Make a GraphQL request for a working page (edit mode) without authentication. For example:
query {
page(url: "/index", pageMode: "WORKING") {
title
}
}
- Inspect the logs
Acceptance Criteria
- [ ] The log should show less information about the page
dotCMS Version
Tested on trunk_52d3299
Proposed Objective
Code Maintenance
Proposed Priority
Priority 4 - Trivial
External Links... Slack Conversations, Support Tickets, Figma Designs, etc.
Slack conversation: https://dotcms.slack.com/archives/CQNF9PCFQ/p1723654751826279
Assumptions & Initiation Needs
No response
Quality Assurance Notes & Workarounds
No response
Sub-Tasks & Estimates
No response
We still needing some work here:
- Basically now we are not returning extra information about the piece of content, but now we are returning two errors in the log that is duplicating the failure, and at the end we are printing a WARN with the graphQL schema that we can exclude from the log. LOG: https://gist.github.com/bryanboza/9ae75b31303fbe5d6055ae23a544eba9
We can remove one of those exceptions and also we need to remove the WARN.
@bryanboza we will remove the duplicate.
The warning is logged by a third-party library. Therefore, that logging level can be defined in the log4j configuration.
Internal QA: Passed.
As we can see in the following image, the error message is now showing the minimal information required to report the error.
Request:
Log trace:
It was tested using the docker image dotcms/dotcms:trunk_042b378
Fixed, tested on trunk // Docker // FF