From 2d7466b4a185b16ac5497b260b87c737ae812d2c Mon Sep 17 00:00:00 2001 From: Christian Wulf <chw@informatik.uni-kiel.de> Date: Tue, 17 Feb 2015 07:57:57 +0100 Subject: [PATCH] added log blocks --- src/main/java/teetime/framework/pipe/PipeFactoryLoader.java | 4 +++- src/main/java/teetime/framework/pipe/PipeFactoryRegistry.java | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/teetime/framework/pipe/PipeFactoryLoader.java b/src/main/java/teetime/framework/pipe/PipeFactoryLoader.java index 6c1f251d..d9b2a140 100644 --- a/src/main/java/teetime/framework/pipe/PipeFactoryLoader.java +++ b/src/main/java/teetime/framework/pipe/PipeFactoryLoader.java @@ -53,7 +53,9 @@ public final class PipeFactoryLoader { pipeFactories.add(pipeFactory); } } catch (ClassNotFoundException e) { - LOGGER.warn("Could not find class: " + line, e); // NOMPD (PMD.GuardLogStatement) + if (LOGGER.isWarnEnabled()) { + LOGGER.warn("Could not find class: " + line, e); + } } catch (InstantiationException e) { LOGGER.warn("Could not instantiate pipe factory", e); } catch (IllegalAccessException e) { diff --git a/src/main/java/teetime/framework/pipe/PipeFactoryRegistry.java b/src/main/java/teetime/framework/pipe/PipeFactoryRegistry.java index 6c40c6bd..335d7349 100644 --- a/src/main/java/teetime/framework/pipe/PipeFactoryRegistry.java +++ b/src/main/java/teetime/framework/pipe/PipeFactoryRegistry.java @@ -101,7 +101,9 @@ public final class PipeFactoryRegistry { public void register(final IPipeFactory pipeFactory) { final String key = this.buildKey(pipeFactory.getThreadCommunication(), pipeFactory.getOrdering(), pipeFactory.isGrowable()); this.pipeFactories.put(key, pipeFactory); - LOGGER.info("Registered pipe factory: " + pipeFactory.getClass().getCanonicalName()); + if (LOGGER.isInfoEnabled()) { + LOGGER.info("Registered pipe factory: " + pipeFactory.getClass().getCanonicalName()); + } } private String buildKey(final ThreadCommunication tc, final PipeOrdering ordering, final boolean growable) { -- GitLab