From 1f8eef141a00658380a212809f8f81cefa5c0f4e Mon Sep 17 00:00:00 2001 From: Jonathan Gallimore Date: Thu, 5 Sep 2024 15:55:03 +0100 Subject: [PATCH] TOMEE-4395 add debug logging for default values --- .../openejb/config/ConfigurationFactory.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurationFactory.java b/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurationFactory.java index b8b5e9eb742..09e4d55394b 100644 --- a/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurationFactory.java +++ b/container/openejb-core/src/main/java/org/apache/openejb/config/ConfigurationFactory.java @@ -1228,6 +1228,21 @@ public T configureService(org.apache.openejb.config.Serv } props.putAll(overrides); + if (logger.isDebugEnabled()) { + for (final Map.Entry entry : props.entrySet()) { + final Object key = entry.getKey(); + Object value = entry.getValue(); + + if (! overrides.containsKey(key) && ! serviceProperties.containsKey(key)) { + if (key instanceof String && "password".equalsIgnoreCase((String) key)) { + value = ""; + } + + logger.debug("[ default used " + key + "=" + value + "]"); + } + } + } + {// force user properties last String propertiesProvider = service.getPropertiesProvider(); if (propertiesProvider == null) {