joerghoh commented on code in PR #5:
URL:
https://github.com/apache/sling-org-apache-sling-commons-threads/pull/5#discussion_r1730396116
##########
src/main/java/org/apache/sling/commons/threads/impl/ThreadLocalCleaner.java:
##########
@@ -159,6 +164,9 @@ public void cleanup() {
diff(inheritableThreadLocalsField,
inheritableThreadLocalsCopy.references);
}
restoreOldThreadLocals();
+ if(cleanupLogCache.add(Thread.currentThread().getId())) {
+ LOG.warn("Cleanup of thread locals performed for {}",
Thread.currentThread());
Review Comment:
The WARN message is not helpful, because it requires a mapping of these IDs
(which are unpredictable by nature) to some (misbehaving) code to be helpful.
But such a mapping does not exist.
I suggest that we rather log the name of the cleaned threadlocal variable,
which then can be used to search the codebase, plus the threadpool in which
this thread was running.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]