Skip to content

Commit

Permalink
#28031 Changing some log level from info to debug to avoid too much n…
Browse files Browse the repository at this point in the history
…oise for requests from the CLI.
  • Loading branch information
jgambarios committed Apr 24, 2024
1 parent 6947043 commit 9ed49c9
Showing 1 changed file with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ public Response getAssetsInfo(@Context final HttpServletRequest request,
.rejectWhenNoUser(true).init();

final User user = initDataObject.getUser();
Logger.info(this,
String.format("User [%s] is requesting assets info for path [%s]", user.getUserId(),
form.assetPath()));
Logger.debug(this,
String.format("User [%s] is requesting assets info for path [%s]",
user.getUserId(), form.assetPath()));
final WebAssetView asset = helper.getAssetInfo(form.assetPath(), user);
return Response.ok(new WebAssetEntityView(asset)).build();
}
Expand Down Expand Up @@ -97,8 +97,9 @@ public Response download(@Context final HttpServletRequest request,
.rejectWhenNoUser(true).init();

final User user = initDataObject.getUser();
Logger.info(this,
String.format("User [%s] is requesting asset content for download for path [%s]", user.getUserId(), form.assetPath()));
Logger.debug(this,
String.format("User [%s] is requesting asset content for download for path [%s]",
user.getUserId(), form.assetPath()));
final File file = helper.getAsset(form, user).getFileAsset();
return Response.ok(file, MediaType.APPLICATION_OCTET_STREAM)
.header("Content-Disposition", "attachment; filename=\"" + file.getName() + "\"")
Expand Down Expand Up @@ -137,7 +138,9 @@ public Response saveUpdateAsset(
final User user = initDataObject.getUser();

final WebAssetView webAssetView = helper.saveUpdateAsset(request, form, user);
Logger.info(this, String.format("User [%s] is uploading asset for path [%s]", user.getUserId(), form.getAssetPath()));
Logger.debug(this,
String.format("User [%s] is uploading asset for path [%s]", user.getUserId(),
form.getAssetPath()));
return Response.ok(new WebAssetEntityView(webAssetView)).build();
}

Expand All @@ -160,7 +163,7 @@ public Response deleteAsset(
@Context final HttpServletRequest request,
@Context final HttpServletResponse response,
AssetInfoRequestForm form
) throws DotSecurityException, DotDataException, IOException {
) throws DotSecurityException, DotDataException {

final InitDataObject initDataObject = new WebResource.InitBuilder()
.requiredBackendUser(true)
Expand Down Expand Up @@ -195,7 +198,7 @@ public Response archiveAsset(
@Context final HttpServletRequest request,
@Context final HttpServletResponse response,
AssetInfoRequestForm form
) throws DotSecurityException, DotDataException, IOException {
) throws DotSecurityException, DotDataException {

final InitDataObject initDataObject = new WebResource.InitBuilder()
.requiredBackendUser(true)
Expand All @@ -206,7 +209,8 @@ public Response archiveAsset(
final User user = initDataObject.getUser();
helper.archiveAsset(form.assetPath(), user);
Logger.info(this,
String.format("User [%s] deleted asset for path [%s] ", user.getUserId(), form.assetPath()));
String.format("User [%s] archived asset for path [%s] ", user.getUserId(),
form.assetPath()));
return Response.ok(new ResponseEntityBooleanView(true)).build();
}

Expand All @@ -230,7 +234,7 @@ public Response deleteFolder(
@Context final HttpServletRequest request,
@Context final HttpServletResponse response,
AssetInfoRequestForm form
) throws DotSecurityException, DotDataException, IOException {
) throws DotSecurityException, DotDataException {

final InitDataObject initDataObject = new WebResource.InitBuilder()
.requiredBackendUser(true)
Expand All @@ -241,9 +245,8 @@ public Response deleteFolder(
final User user = initDataObject.getUser();
helper.deleteFolder(form.assetPath(), user);
Logger.info(this,
String.format("User [%s] deleted foldr for path [%s]. ",
user.getUserId(), form.assetPath()
));
String.format("User [%s] deleted folder for path [%s]. ",
user.getUserId(), form.assetPath()));
return Response.ok(new ResponseEntityBooleanView(true)).build();
}

Expand Down

0 comments on commit 9ed49c9

Please sign in to comment.