Skip to content

Commit

Permalink
CB-5584. Refactor after review
Browse files Browse the repository at this point in the history
  • Loading branch information
DenisSinelnikov committed Nov 11, 2024
1 parent a3347e5 commit 8ecb8e9
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

public class GraphQLLoggerUtil {

public static final String LOG_API_GRAPHQL_DEBUG_PARAMETER = "log.api.graphql.debug";
private static final Set<String> PROHIBITED_VARIABLES =
Set.of("password", "config", "parameters", "settings", "licenseText", "credentials", "username");

Expand All @@ -50,7 +51,9 @@ public static String buildLoggerMessage(String sessionId, String userId, Map<Str
StringBuilder loggerMessage = new StringBuilder(" [user: ").append(userId)
.append(", sessionId: ").append(sessionId).append("]");

if (CBPlatform.getInstance().getPreferenceStore().getBoolean("log.api.graphql.debug") && variables != null) {
if (CBPlatform.getInstance().getPreferenceStore().getBoolean(LOG_API_GRAPHQL_DEBUG_PARAMETER)
&& variables != null
) {
loggerMessage.append(" [variables] ");
String parsedVariables = parseVarialbes(variables);
if (CommonUtils.isNotEmpty(parsedVariables)) {
Expand Down

0 comments on commit 8ecb8e9

Please sign in to comment.