[ACS-9839] Additional logging (#1124)

* [ACS-9839] Additional logging

* [ACS-9839] Now its as clear as it can be
This commit is contained in:
cezary-witkowski
2025-07-25 15:03:48 +02:00
committed by GitHub
parent d695b7d3e2
commit b5680b35b9
4 changed files with 44 additions and 2 deletions

View File

@@ -49,6 +49,12 @@ public class MessagingInfo
@Value("${activemq.url:}")
private String activemqUrl;
@Value("${spring.activemq.broker-url}")
private String activemqBrokerUrl;
@Value("${activemq.url.params}")
private String activemqUrlParams;
@PostConstruct
public void init()
{
@@ -59,7 +65,7 @@ public class MessagingInfo
// If this needs to be fully overridden then it would require explicitly setting both "spring.activemq.broker-url"
// *and* "activemq.url" (latter to non-false value). ACTIVEMQ_URL_PARAMS value will be ignored in that case.
if ((activemqUrl != null) && (!activemqUrl.equals("false")))
if (isSet(activemqUrl))
{
logger.info("JMS client is ENABLED - ACTIVEMQ_URL ='{}'", activemqUrl);
}
@@ -67,5 +73,19 @@ public class MessagingInfo
{
logger.info("JMS client is DISABLED - ACTIVEMQ_URL is not set");
}
if (isSet(activemqUrlParams))
{
logger.info("ACTIVEMQ_URL_PARAMS ='{}'", activemqUrlParams);
}
else
{
logger.info("ACTIVEMQ_URL_PARAMS is not set");
}
logger.info("spring.activemq.broker-url='{}'", activemqBrokerUrl);
}
private boolean isSet(String value)
{
return !"false".equals(value);
}
}

View File

@@ -16,6 +16,7 @@ spring:
activemq:
url: ${ACTIVEMQ_URL:false}
url.params: ${ACTIVEMQ_URL_PARAMS:false}
server:
port: ${SERVER_PORT:8090}

View File

@@ -46,6 +46,12 @@ public class MessagingInfo
@Value("${activemq.url:}")
private String activemqUrl;
@Value("${spring.activemq.broker-url}")
private String activemqBrokerUrl;
@Value("${activemq.url.params}")
private String activemqUrlParams;
@PostConstruct
public void init()
{
@@ -56,7 +62,7 @@ public class MessagingInfo
// If this needs to be fully overridden then it would require explicitly setting both "spring.activemq.broker-url"
// *and* "activemq.url" (latter to non-false value). ACTIVEMQ_URL_PARAMS value will be ignored in that case.
if ((activemqUrl != null) && (!activemqUrl.equals("false")))
if (isSet(activemqUrl))
{
logger.info("JMS client is ENABLED - ACTIVEMQ_URL ='{}'", activemqUrl);
}
@@ -64,5 +70,19 @@ public class MessagingInfo
{
logger.info("JMS client is DISABLED - ACTIVEMQ_URL is not set");
}
if (isSet(activemqUrlParams))
{
logger.info("ACTIVEMQ_URL_PARAMS ='{}'", activemqUrlParams);
}
else
{
logger.info("ACTIVEMQ_URL_PARAMS is not set");
}
logger.info("spring.activemq.broker-url='{}'", activemqBrokerUrl);
}
private boolean isSet(String value)
{
return !"false".equals(value);
}
}

View File

@@ -16,6 +16,7 @@ spring:
activemq:
url: ${ACTIVEMQ_URL:false}
url.params: ${ACTIVEMQ_URL_PARAMS:false}
server:
port: ${SERVER_PORT:8090}