code: private void updateConfiguration( BundleContext bundleContext,
                                        final String pattern )
          throws IOException
      {
          final ConfigurationAdmin configAdmin = getConfigurationAdmin( bundleContext );
          final Configuration configuration = configAdmin.getConfiguration( "org.ops4j.pax.logging", null );
  
          final Hashtable<String, Object> log4jProps = new Hashtable<String, Object>();
          log4jProps.put( "log4j.rootLogger", "DEBUG, CONSOLE" );
          log4jProps.put( "log4j.appender.CONSOLE", "org.apache.log4j.ConsoleAppender" );
          log4jProps.put( "log4j.appender.CONSOLE.layout", "org.apache.log4j.PatternLayout" );
          log4jProps.put( "log4j.appender.CONSOLE.layout.ConversionPattern", pattern );
  
          configuration.update( log4jProps );
      }
docs: Updates Pax Logging configuration to a specifid conversion pattern.
  
  @param bundleContext bundle context
  @param pattern       layout conversion pattern
  
  @throws IOException - Re-thrown