From c6d20faa34cdaf54a370d47ff9d0e25939a735c1 Mon Sep 17 00:00:00 2001 From: Simon Detheridge Date: Thu, 8 Jul 2021 12:16:07 +0100 Subject: [PATCH] Add debug logging to push mechanism --- .../src/main/java/uk/ac/ic/wlgitbridge/bridge/Bridge.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/bridge/Bridge.java b/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/bridge/Bridge.java index 64906a6b46..f07e622d80 100644 --- a/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/bridge/Bridge.java +++ b/services/git-bridge/src/main/java/uk/ac/ic/wlgitbridge/bridge/Bridge.java @@ -451,6 +451,7 @@ public class Bridge { RawDirectory oldDirectoryContents, String hostname ) throws SnapshotPostException, IOException, MissingRepositoryException, ForbiddenException, GitUserException { + Log.debug("[{}] pushing to Overleaf", projectName); try (LockGuard __ = lock.lockGuard(projectName)) { pushCritical( oauth2, @@ -538,10 +539,11 @@ public class Bridge { if (maxFileNum.isPresent()) { long maxFileNum_ = maxFileNum.get(); if (directoryContents.getFileTable().size() > maxFileNum_) { + Log.debug("[{}] Too many files: {}/{}", projectName, directoryContents.getFileTable().size(), maxFileNum_); throw new FileLimitExceededException(directoryContents.getFileTable().size(), maxFileNum_); } } - Log.info("[{}] Pushing", projectName); + Log.info("[{}] Pushing files ({} new, {} old)", projectName, directoryContents.getFileTable().size(), oldDirectoryContents.getFileTable().size()); String postbackKey = postbackManager.makeKeyForProject(projectName); Log.info( "[{}] Created postback key: {}",