public static void WriteToLog(string message, CustomLogType 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; } }
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; } }
public static void WriteToLog(string message, CustomLogType logType, string addtionalInfo, string screenShotFileName) { switch (Settings.TestLogTarget) { case LogTarget.Log4Net: if (logger is null) { logger = new LogFourNetManager(); } logger.Log(message, logType, addtionalInfo); string screenshotFilePath = BrowserScreenshot.CaptureBrowserScreenshot(screenShotFileName); logger.Log("Screenshot added to loaction : " + screenshotFilePath, logType); break; case LogTarget.Text: break; default: break; } }