Skip to content

Commit 5b9d519

Browse files
committed
Improved logging
1 parent ae2312f commit 5b9d519

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

stroom-core-server/src/main/java/stroom/task/server/TaskManagerImpl.java

+4-5
Original file line numberDiff line numberDiff line change
@@ -306,10 +306,10 @@ protected void exec() {
306306
}
307307

308308
if (t instanceof ThreadDeath || t instanceof TaskTerminatedException) {
309-
LOGGER.warn("exec() - Task killed!");
310-
LOGGER.debug("exec()", t);
309+
LOGGER.warn("exec() - Task killed! (" + task.getClass().getSimpleName() + ")");
310+
LOGGER.debug("exec() (" + task.getClass().getSimpleName() + ")", t);
311311
} else {
312-
LOGGER.error(t.getMessage(), t);
312+
LOGGER.error(t.getMessage() + " (" + task.getClass().getSimpleName() + ")", t);
313313
}
314314

315315
} finally {
@@ -340,7 +340,7 @@ protected void exec() {
340340

341341
} catch (final Throwable t) {
342342
try {
343-
LOGGER.fatal("exec() - Unexpected Exception", t);
343+
LOGGER.fatal("exec() - Unexpected Exception (" + task.getClass().getSimpleName() + ")", t);
344344
throw new RuntimeException(t.getMessage(), t);
345345

346346
} finally {
@@ -367,7 +367,6 @@ private <R> void doExec(final Task<R> task, final TaskCallback<R> callback) {
367367

368368
currentThread.setName(oldThreadName + " - " + task.getClass().getSimpleName());
369369
try {
370-
371370
String userToken = task.getUserToken();
372371
if (userToken == null) {
373372
if (LOGGER.isDebugEnabled()) {

0 commit comments

Comments
 (0)