File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/main/java/org/apache/maven/plugins/pmd Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -232,6 +232,13 @@ public abstract class AbstractPmdReport
232
232
@ Parameter ( defaultValue = "true" , property = "pmd.showPmdLog" )
233
233
protected boolean showPmdLog = true ;
234
234
235
+ /**
236
+ * This holds a strong reference in case we configured the logger to
237
+ * redirect to slf4j. See {@link #showPmdLog}. Without a strong reference,
238
+ * the logger might be garbage collected and the redirect to slf4j is gone.
239
+ */
240
+ private Logger julLogger ;
241
+
235
242
/** The files that are being analyzed. */
236
243
protected Map <File , PmdFileInfo > filesToProcess ;
237
244
@@ -576,7 +583,8 @@ protected void setupPmdLogging()
576
583
logger .addHandler ( handler );
577
584
handler .setLevel ( Level .ALL );
578
585
logger .setLevel ( Level .ALL );
579
- getLog ().debug ( "Configured jul-to-slf4j bridge for " + logger .getName () );
586
+ julLogger = logger ;
587
+ julLogger .fine ( "Configured jul-to-slf4j bridge for " + logger .getName () );
580
588
}
581
589
582
590
static String getPmdVersion ()
You can’t perform that action at this time.
0 commit comments