CreateService() private static method

Creates the logging service and return the newly created instance.
The configuration file used by log4net will be the application's configuration file (web.config ou app.exe.config) which will have to contain a <log4net> section.
private static CreateService ( Type type ) : ILogService
type System.Type The type that requests the creation of a log service.
return ILogService
        private static void ConfigureLog4Net(string filename)
        {
            if (log4netConfiguredYet)
            {
                return;
            }

            InitializeApplicationName();
            if (!string.IsNullOrEmpty(filename))
            {
                var file = new FileInfo(filename);
                if (file != null)
                {
                    global::log4net.Config.XmlConfigurator.Configure(file);
                    log4netConfiguredYet = true;
                }
            }

            // maybe we have config in the app.config file?
            if (!log4netConfiguredYet)
            {
                global::log4net.Config.XmlConfigurator.Configure();
                log4netConfiguredYet = true;
            }

            // Forces initialization
            var initialLogger = Log4NetServiceFactory.CreateService(null);
        }
 /// <summary>
 /// Obtains an instance of the logger service for the specified type and optional additional data.
 /// </summary>
 /// <param name="type">The type.</param>
 /// <param name="additionalData">The additional data.</param>
 /// <returns>
 /// An implementation of <see cref="ILogService"/>.
 /// </returns>
 public ILogService GetLogger(Type type, IDictionary <string, object> additionalData = null)
 {
     // We do nothing with the additional data at the moment.
     return(Log4NetServiceFactory.CreateService(type));
 }