The IWorkloadInspector to probe for the presence of the log4net assembly in the workload and determine whether the log4net configuration is loaded from the app.config (web.config) or a separate log4net XML document. When found, the log4net configuration is updated to replace the existing appender configuration with the Apprenda appender and the Apprenda appender assembly is added to the workload.
Inheritance: WorkloadInspectorBase
        /// <summary>
        /// The bootstrap.
        /// </summary>
        /// <param name="bootstrappingRequest">
        /// The bootstrapping bootstrappingRequest.
        /// </param>
        /// <returns>
        /// The <see cref="BootstrappingResult"/>.
        /// </returns>
        public override BootstrappingResult Bootstrap(BootstrappingRequest bootstrappingRequest)
        {
            IWorkloadInspector inspector;

            foreach (var configFileProperty in
                    bootstrappingRequest.Properties.Where(cp => cp.Name.Equals("log4net.ConfigurationFilePath")))
            {
                if (!this._allowComponentTypes.Contains(bootstrappingRequest.ComponentType))
                {
                    return
                        BootstrappingResult.Failure(
                            new[]
                                {
                                    "Cannot apply explicit log4net configuration to component type "
                                    + bootstrappingRequest.ComponentType + "."
                                });
                }
                if (!configFileProperty.Values.Any())
                {
                    continue;
                }

                var results =
                    configFileProperty.Values.SelectMany(p => new Log4NetConfigurationUpdateService(p).Update())
                        .ToArray();
                return results.Any() ? BootstrappingResult.Failure(results) : BootstrappingResult.Success();
            }

            switch (bootstrappingRequest.ComponentType)
            {
                case ComponentType.PublicAspNet:
                case ComponentType.AspNet:
                    inspector = new UserInterfaceWorkloadInspector(bootstrappingRequest);
                    break;
                case ComponentType.WcfService:
                    inspector = new WcfServiceWorkloadInspector(bootstrappingRequest);
                    break;
                default:
                    inspector = new IgnoredWorkloadInspector();
                    break;
            }

            return inspector.Execute();
        }