Пример #1
0
        public static ILogManager CreateLogManager(LoggingConfiguration config = null)
        {
            var cfg = config ?? DefaultConfiguration;

            cfg.Freeze();

            var manager = new LogManager(cfg);

            Configurator.OnLogManagerCreated(manager);

            return(manager);
        }
Пример #2
0
        public static ILogManager CreateLogManager(LoggingConfiguration config = null)
        {
            var cfg = config ?? DefaultConfiguration;

            cfg.Freeze();


            ILogManager manager;
            var         managerFactory = PlatformAdapter.Resolve <ILogManagerCreator>(false);

            if (managerFactory != null)
            {
                manager = managerFactory.Create(cfg);
            }
            else
            {
                manager = new LogManagerBase(cfg);
            }

            _configurator.OnLogManagerCreated(manager);

            return(manager);
        }