[Minor] better logging in DefaultLockHandler

This commit is contained in:
Robert von Burg 2023-02-14 10:14:10 +01:00
parent 51d8ff6d6c
commit 96ccb9e2e0
Signed by: eitch
GPG Key ID: 75DB9C85C74331F7
1 changed files with 2 additions and 2 deletions

View File

@ -145,12 +145,12 @@ public class DefaultLockHandler implements LockHandler {
Thread owner = lock.getOwner();
if (owner == null) {
logger.error("Lock is currently held unknown thread!");
logger.error(MessageFormat.format("Lock {0} is currently held by unknown thread!", locator));
logger.error(lock.toString());
} else {
Exception e = new Exception();
e.setStackTrace(owner.getStackTrace());
logger.error(MessageFormat.format("Lock is currently held by {0}", owner), e);
logger.error(MessageFormat.format("Lock {0} is currently held by {1}", locator, owner), e);
}
logger.error("Threads waiting on this lock are:");