Exemple #1
0
        protected override void OnInitialized()
        {
            base.OnInitialized();

            foreach (var sink in Container.Resolve <IEnumerable <ILoggingSink> >())
            {
                LoggerFactory.AddSink(sink);
            }
            LoggerFactory.GetLogger(GetType()).Notice("Application ready");
        }
Exemple #2
0
        public override void Run(bool runWithDefaultConfiguration)
        {
            LoggerFactory.Implementation = new DefaultLoggerFactory();
            LoggerFactory.LogLevel       = LogLevel.Info;

            ThowDataBindingError40TraceListener.Initialize();

            base.Run(runWithDefaultConfiguration);

            LoggerFactory.AddSink(Container.GetExportedValue <LoggingSink>());

            // we have to call this here in order to support regions which are provided by modules
            RegionManager.UpdateRegions();
        }
        public override void Run(bool runWithDefaultConfiguration)
        {
            LoggerFactory.Implementation = new CustomLoggerFactory();
            LoggerFactory.LogLevel       = LogLevel.Notice;

            base.Run(runWithDefaultConfiguration);

            Application.Current.Exit += OnShutdown;

            foreach (var sink in Container.ResolveAll <ILoggingSink>())
            {
                LoggerFactory.AddSink(sink);
            }
            LoggerFactory.GetLogger(GetType()).Notice("Application ready");
        }