You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2021/08/23 10:22:52 UTC

[wicket] branch master updated: Small logging improvements to JMX Initializer

This is an automated email from the ASF dual-hosted git repository.

mgrigorov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/wicket.git


The following commit(s) were added to refs/heads/master by this push:
     new 6238623  Small logging improvements to JMX Initializer
6238623 is described below

commit 6238623cc014355eb8f70736fa9d71c9d6345797
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
AuthorDate: Mon Aug 23 13:22:06 2021 +0300

    Small logging improvements to JMX Initializer
---
 wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java b/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
index 6b896ba..f3f7518 100644
--- a/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
+++ b/wicket-jmx/src/main/java/org/apache/wicket/jmx/Initializer.java
@@ -67,7 +67,7 @@ import org.slf4j.LoggerFactory;
  */
 public class Initializer implements IInitializer
 {
-	private static Logger log = LoggerFactory.getLogger(Initializer.class);
+	private static final Logger log = LoggerFactory.getLogger(Initializer.class);
 
 	// It's best to store a reference to the MBeanServer rather than getting it
 	// over and over
@@ -120,7 +120,7 @@ public class Initializer implements IInitializer
 				}
 				else
 				{
-					log.error("unable to find mbean server with agent id " + agentId);
+					log.error("unable to find mbean server with agent id {}", agentId);
 				}
 			}
 			if (mbeanServer == null)
@@ -133,7 +133,8 @@ public class Initializer implements IInitializer
 				catch (SecurityException e)
 				{
 					// Ignore - we're not allowed to read this property.
-					log.warn("not allowed to read property wicket.mbean.server.class due to security settings; ignoring");
+					log.warn("Not allowed to read property wicket.mbean.server.class due to security settings: {}. Ignoring",
+							e.getMessage());
 				}
 				if (impl != null)
 				{
@@ -289,4 +290,4 @@ public class Initializer implements IInitializer
 		mbeanServer.registerMBean(bean, objectName);
 		registered.add(objectName);
 	}
-}
\ No newline at end of file
+}