Skip to content

Commit 5c749ec

Browse files
shwstppryadvr
andauthored
logging: httpupload do not warn with exception trace (#9220)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com> Co-authored-by: Rohit Yadav <rohityadav89@gmail.com>
1 parent e2e46e3 commit 5c749ec

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/resource/HttpUploadServerHandler.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,8 @@ private void writeResponse(Channel channel, HttpResponseStatus statusCode) {
295295

296296
@Override
297297
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception {
298-
logger.warn(responseContent.toString(), cause);
298+
logger.warn(String.format("%s. Exception occurred: %s", responseContent.toString(), cause.getMessage()));
299+
logger.debug("Exception caught by HTTP upload handler, caused due to: ", cause);
299300
responseContent.append("\r\nException occurred: ").append(cause.getMessage());
300301
writeResponse(ctx.channel(), HttpResponseStatus.INTERNAL_SERVER_ERROR);
301302
ctx.channel().close();

0 commit comments

Comments
 (0)