示例#1
0
        public static void IsEnabledFor_finest_is_false_when_config_log_is_debug()
        {
            ILogConfig config = GetLogConfig("debug");

            LoggerBootstrapper.Initialize();
            LoggerBootstrapper.ConfigureLogger(config);
            Assert.IsFalse(Log.IsFinestEnabled);
        }
示例#2
0
        public static void IsDebugEnabled_is_false_when_config_log_is_info()
        {
            ILogConfig config = GetLogConfig("info");

            LoggerBootstrapper.Initialize();
            LoggerBootstrapper.ConfigureLogger(config);
            Assert.IsFalse(Log.IsDebugEnabled);
        }
示例#3
0
        public static void IsDebugEnabled_is_true_when_config_log_is_debug()
        {
            ILogConfig config = GetLogConfig("debug");

            LoggerBootstrapper.Initialize();
            LoggerBootstrapper.ConfigureLogger(config);
            Assert.That(Log.IsDebugEnabled);
        }
            static CallOnce()
            {
                // we must ensure that we hook up to ProcessExit and DomainUnload *before* log4net.  Otherwise we can't log anything during OnExit.
                AppDomain.CurrentDomain.ProcessExit  += (sender, args) => OnExit(sender, args);
                AppDomain.CurrentDomain.DomainUnload += (sender, args) => OnExit(sender, args);
                LoggerBootstrapper.Initialize();

                // Force agent to be initialized
                var agent = AgentManager.Instance;
            }