aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2017-01-27 11:23:22 +0900
committerDavid Pursehouse <david.pursehouse@gmail.com>2017-01-27 15:59:09 +0900
commit2eb1bebd605852b7ef240e700943dfba7c0a1b3f (patch)
tree02e068a6ae7ee70100a1348870f85616a5a9a34d /org.eclipse.jgit/src
parentc9f55032a281011f8db15afab33f43e850ec413b (diff)
downloadjgit-2eb1bebd605852b7ef240e700943dfba7c0a1b3f.tar.gz
jgit-2eb1bebd605852b7ef240e700943dfba7c0a1b3f.zip
Repository: Include repository name when logging corrupt use count
Logging the repository name makes it easier to track down what is incorrectly closing a repository. Change-Id: I42a8bdf766c0e67f100adbf76d9616584e367ac2 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit/src')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
index 641262cd50..6be97ffda6 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
@@ -889,11 +889,12 @@ public abstract class Repository implements AutoCloseable {
} else if (newCount == -1) {
// should not happen, only log when useCnt became negative to
// minimize number of log entries
+ String message = MessageFormat.format(JGitText.get().corruptUseCnt,
+ toString());
if (LOG.isDebugEnabled()) {
- IllegalStateException e = new IllegalStateException();
- LOG.debug(JGitText.get().corruptUseCnt, e);
+ LOG.debug(message, new IllegalStateException());
} else {
- LOG.warn(JGitText.get().corruptUseCnt);
+ LOG.warn(message);
}
if (RepositoryCache.isCached(this)) {
closedAt.set(System.currentTimeMillis());