From 26340b72e56509c2dd2650662cc30f22441ec1a6 Mon Sep 17 00:00:00 2001 From: Steffen Ritter Date: Thu, 11 Jul 2024 16:14:26 +0200 Subject: [server] Log readable name on image upload to master --- .../java/org/openslx/bwlp/sat/fileserv/SyncTransferHandler.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/fileserv/SyncTransferHandler.java b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/fileserv/SyncTransferHandler.java index 54a9655e..8d17fa15 100644 --- a/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/fileserv/SyncTransferHandler.java +++ b/dozentenmodulserver/src/main/java/org/openslx/bwlp/sat/fileserv/SyncTransferHandler.java @@ -129,19 +129,19 @@ public class SyncTransferHandler { TransferInformation transferInfo; OutgoingDataTransfer existing = uploadsByVersionId.get(imgVersion.imageVersionId); if (existing != null) { - LOGGER.info("Client wants to upload image " + imgVersion.imageVersionId + LOGGER.info("Client wants to upload image " + imgVersion.imageVersionId + " of '" + imgBase.imageName + "' to master" + " which is already in progess via " + existing.getId()); return existing.getId(); } File absFile = FileSystem.composeAbsoluteImagePath(imgVersion); if (!absFile.isFile() || !absFile.canRead()) { - LOGGER.error("Cannot upload " + imgVersion.imageVersionId + ": file missing: " + LOGGER.error("Cannot upload " + imgVersion.imageVersionId + " of '" + imgBase.imageName + "': file missing: " + absFile.getAbsolutePath()); DbImage.markValid(false, true, imgVersion); throw new TInvocationException(InvocationError.INTERNAL_SERVER_ERROR, "Source file not readable"); } if (absFile.length() != imgVersion.fileSize) { - LOGGER.error("Cannot upload" + imgVersion.imageVersionId + ": wrong file size - expected " + LOGGER.error("Cannot upload" + imgVersion.imageVersionId + " of '" + imgBase.imageName + "': wrong file size - expected " + imgVersion.fileSize + ", got " + absFile.length()); DbImage.markValid(false, true, imgVersion); throw new TInvocationException(InvocationError.INTERNAL_SERVER_ERROR, @@ -187,7 +187,7 @@ public class SyncTransferHandler { OutgoingDataTransfer transfer = new OutgoingDataTransfer(transferInfo, absFile, imgVersion.imageVersionId); uploadsByVersionId.put(imgVersion.imageVersionId, transfer); uploadsByTransferId.put(transfer.getId(), transfer); - LOGGER.info("Client wants to upload image " + imgVersion.imageVersionId + LOGGER.info("Client wants to upload image " + imgVersion.imageVersionId + " of '" + imgBase.imageName + "' to master" + ", created transfer " + transfer.getId()); heartBeatTask.fire(); return transfer.getId(); -- cgit v1.2.3-55-g7522