예제 #1
0
        public static ILogManager Configure(ZeroLogBasicConfiguration config)
        {
            config ??= new ZeroLogBasicConfiguration();
            var dummyResolver = new BasicResolver(config.Appenders, config.Level, config.LogEventPoolExhaustionStrategy, config.LogEventArgumentExhaustionStrategy);

            return(LogManager.Initialize(dummyResolver, config.ToInitializationConfig()));
        }
예제 #2
0
        public static ILogManager Configure(IEnumerable <IAppender> appenders, ZeroLogInitializationConfig initializationConfig)
        {
            var config = new ZeroLogBasicConfiguration
            {
                Appenders = appenders.ToList()
            };

            if (initializationConfig != null)
            {
                config.ApplyInitializationConfig(initializationConfig);
            }

            return(Configure(config));
        }