{
final Logger extLogger = m_loggerManager.getLoggerForCategory( "system.extensions" );
if ( serviceManager.hasService( LifecycleExtensionManager.ROLE ) )
{
final LifecycleExtensionManager parent = (LifecycleExtensionManager)
serviceManager.lookup( LifecycleExtensionManager.ROLE );
if ( extLogger.isDebugEnabled() )
{
final String message = "Found the LifecycleExtensionManager, creating a copy.";
extLogger.debug( message );
}
m_extManager = parent.writeableCopy();
}
else
{
if ( extLogger.isDebugEnabled() )
{
final String message = "No LifecycleExtensionManager found, creating a new one.";
extLogger.debug( message );
}
m_extManager = new LifecycleExtensionManager();
}
/** LifecycleExtensionManager.writeableCopy() does not copy the logger. */
m_extManager.enableLogging( extLogger );