示例#1
0
        public void LogAllEnable()
        {
            var config = new LogConfig()
            {
                LogInfo = true, LogError = true, LogWarning = true
            };

            TestLogger.LoggerInitialize(config);
            LoggerManager.Instance.CurrentLogger.LogInfo(INFOMSG);

            Assert.Equal(INFOMSG, TestLog.MessageLoged);

            TestLog.CleanMessage();
            LoggerManager.Instance.CurrentLogger.LogWarning(WARNMSG);
            Assert.Equal(WARNMSG, TestLog.MessageLoged);

            TestLog.CleanMessage();
            LoggerManager.Instance.CurrentLogger.LogError(ERROMSG);
            Assert.Equal(ERROMSG, TestLog.MessageLoged);
        }