Skip to content

quote project name in log entires #4777

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public Response addProject(@Context HttpServletRequest request, String projectNa
// Avoid classification as a taint bug.
final String projectName = Laundromat.launderInput(projectNameParam);

LOGGER.log(Level.INFO, "adding project {0}", projectName);
LOGGER.log(Level.INFO, "adding project ''{0}''", projectName);

return ApiTaskManager.getInstance().submitApiTask(PROJECTS_PATH,
new ApiTask(request.getRequestURI(),
Expand Down Expand Up @@ -181,7 +181,7 @@ public Response deleteProject(@Context HttpServletRequest request, @PathParam("p
final String projectName = Laundromat.launderInput(projectNameParam);

Project project = disableProject(projectName);
LOGGER.log(Level.INFO, "deleting configuration for project {0}", projectName);
LOGGER.log(Level.INFO, "deleting configuration for project ''{0}''", projectName);

return ApiTaskManager.getInstance().submitApiTask(PROJECTS_PATH,
new ApiTask(request.getRequestURI(),
Expand Down Expand Up @@ -405,7 +405,7 @@ public void set(
}
}
} else {
LOGGER.log(Level.WARNING, "cannot find project {0} to set a property", projectName);
LOGGER.log(Level.WARNING, "cannot find project ''{0}'' to set a property", projectName);
}
}

Expand All @@ -421,7 +421,7 @@ public Object get(@PathParam("project") String projectName, @PathParam("field")
Project project = env.getProjects().get(projectName);
if (project == null) {
throw new WebApplicationException(
"cannot find project " + projectName + " to get a property", Response.Status.BAD_REQUEST);
"cannot find project '" + projectName + "' to get a property", Response.Status.BAD_REQUEST);
}
return ClassUtil.getFieldValue(project, field);
}
Expand Down
Loading