Пример #1
0
        public static void WriteToLog(object obj, string exceptionMessage)
        {
            switch (Settings.TestLogTarget)
            {
            case LogTarget.Log4Net:
                if (logger is null)
                {
                    logger = new LogFourNetManager();
                }
                logger.Log(DateTime.Now.ToString("yyyyMMdd-HH.mm.ss") + ":  " + obj + ":  " + exceptionMessage);
                break;

            case LogTarget.Text:
                break;

            default:
                break;
            }
        }
Пример #2
0
        public static void WriteToLog(string message, LogType logType)
        {
            switch (Settings.TestLogTarget)
            {
            case LogTarget.Log4Net:
                if (logger is null)
                {
                    logger = new LogFourNetManager();
                }
                logger.Log(message, logType);
                break;

            case LogTarget.Text:
                break;

            default:
                break;
            }
        }
Пример #3
0
        public static void WriteToLog(string message, LogType logType, string screenShotFileName)
        {
            switch (Settings.TestLogTarget)
            {
            case LogTarget.Log4Net:
                if (logger is null)
                {
                    logger = new LogFourNetManager();
                }
                logger.Log(message, logType);
                string screenshotFilePath = BrowserScreenshot.CaptureBrowserScreenshot(screenShotFileName);
                logger.Log("Screenshot added to loaction : " + screenshotFilePath, logType);
                break;

            case LogTarget.Text:
                break;

            default:
                break;
            }
        }