code: @Override
      protected LogHandler createLogHandler(ServletConfig pServletConfig, boolean pDebug) {
          // If there is a bundle context available, set up a tracker for tracking the logging
          // service
          BundleContext ctx = getBundleContext(pServletConfig);
          if (ctx != null) {
              // Track logging service
              logTracker = new ServiceTracker(ctx, LogService.class.getName(), null);
              logTracker.open();
              return new ActivatorLogHandler(logTracker,pDebug);
          } else {
              // Use default log handler
              return super.createLogHandler(pServletConfig, pDebug);
          }
      }
docs: Create a log handler which tracks a {@link LogService} and, if available, use the log service
  for logging, in the other time uses the servlet's default logging facility
  
  @param pServletConfig  servlet configuration
  @param pDebug