Skip to content

Commit 6bb228d

Browse files
authored
Merge pull request #317 from kwin/feature/FELIX-6704-improve-error-logging-in-configMgr
FELIX-6704: Include config/factory PID in error message
2 parents f0308f5 + 499d373 commit 6bb228d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

configadmin/src/main/java/org/apache/felix/cm/impl/ConfigurationManager.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -929,8 +929,10 @@ public void callPlugins( final Dictionary<String, Object> props, final ServiceRe
929929
}
930930
catch ( Throwable t )
931931
{
932-
Log.logger.log( LogService.LOG_ERROR, "Unexpected problem calling configuration plugin {0}", new Object[]
933-
{ pluginRef , t } );
932+
String effectivePid = (factoryPid == null) ? configPid : factoryPid;
933+
String effectivePidLabel = (factoryPid == null) ? "Configuration PID" : "Factory PID";
934+
Log.logger.log( LogService.LOG_ERROR, "Unexpected problem calling configuration plugin {0} for {1}: {2} ", new Object[]
935+
{ pluginRef, effectivePidLabel, effectivePid, t } );
934936
}
935937
finally
936938
{

0 commit comments

Comments
 (0)