private static void RegisterCoreComponents(this ZkWebLogServiceCollection loggingServices, Action <ILogServiceCollection> serviceConfigure)
        {
            using (loggingServices) {
                serviceConfigure?.Invoke(loggingServices);

                loggingServices.BuildConfiguration();
                loggingServices.ActiveSinkSettings();
                loggingServices.ActiveOriginConfiguration();
            }
        }
        public static IContainer RegisterCosmosLogging(this IContainer ioc, Action <ILogServiceCollection> config)
        {
            var serviceImpl = new ZkWebLogServiceCollection();

            config?.Invoke(serviceImpl);

            ioc.Register <ILoggingServiceProvider, ZKWebLoggingServiceProvider>(ReuseType.Singleton);

            serviceImpl.BuildConfiguration();
            serviceImpl.ActiveSinkSettings();
            serviceImpl.ActiveOriginConfiguration();

            ioc.RegisterFromServiceCollection(serviceImpl.ExposeServices());
            ioc.RegisterInstance(Options.Create((LoggingOptions)serviceImpl.ExposeLogSettings()), ReuseType.Singleton);
            ioc.RegisterInstance(serviceImpl.ExposeLoggingConfiguration(), ReuseType.Singleton);

            StaticServiceResolver.SetResolver(ioc.Resolve <ILoggingServiceProvider>());

            return(ioc);
        }