From 499d3736effd86ee40985433d9062ca6ec40c470 Mon Sep 17 00:00:00 2001 From: Konrad Windszus Date: Tue, 7 May 2024 21:07:32 +0200 Subject: [PATCH] FELIX-6704: Include config/factory PID in error message --- .../java/org/apache/felix/cm/impl/ConfigurationManager.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationManager.java b/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationManager.java index a2068de0e1..94b7f7419d 100644 --- a/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationManager.java +++ b/configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationManager.java @@ -929,8 +929,10 @@ public void callPlugins( final Dictionary props, final ServiceRe } catch ( Throwable t ) { - Log.logger.log( LogService.LOG_ERROR, "Unexpected problem calling configuration plugin {0}", new Object[] - { pluginRef , t } ); + String effectivePid = (factoryPid == null) ? configPid : factoryPid; + String effectivePidLabel = (factoryPid == null) ? "Configuration PID" : "Factory PID"; + Log.logger.log( LogService.LOG_ERROR, "Unexpected problem calling configuration plugin {0} for {1}: {2} ", new Object[] + { pluginRef, effectivePidLabel, effectivePid, t } ); } finally {