From 9fe19413e976bf0c5985d310028f716a3b4fb942 Mon Sep 17 00:00:00 2001 From: Anand Bagmar Date: Tue, 5 Nov 2024 18:01:40 +0530 Subject: [PATCH] updated log levels in ScreenShotManager --- .../com/znsio/teswiz/tools/ScreenShotManager.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/znsio/teswiz/tools/ScreenShotManager.java b/src/main/java/com/znsio/teswiz/tools/ScreenShotManager.java index 7ae95c0bd..a9b1738e7 100644 --- a/src/main/java/com/znsio/teswiz/tools/ScreenShotManager.java +++ b/src/main/java/com/znsio/teswiz/tools/ScreenShotManager.java @@ -34,22 +34,19 @@ public void takeScreenShot(WebDriver driver, String fileName) { if(null != driver) { fileName = normaliseScenarioName(getPrefix() + "-" + fileName); File destinationFile = createScreenshotFile(directoryPath, fileName); - LOGGER.info( - "The screenshot will be placed here : " + destinationFile.getAbsolutePath()); + LOGGER.debug("The screenshot will be placed here : " + destinationFile.getAbsolutePath()); try { File screenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE); - LOGGER.info("Original screenshot : " + screenshot.getAbsolutePath()); + LOGGER.debug("Original screenshot : " + screenshot.getAbsolutePath()); FileUtils.copyFile(screenshot, destinationFile); - LOGGER.info( - "The screenshot is available here : " + destinationFile.getAbsolutePath()); + LOGGER.info("The screenshot is available here : " + destinationFile.getAbsolutePath()); ReportPortalLogger.attachFileInReportPortal(fileName, destinationFile); } catch(IOException | RuntimeException e) { - LOGGER.info( - "ERROR: Unable to save or upload screenshot: '" + destinationFile.getAbsolutePath() + "' or upload screenshot to ReportPortal\n"); + LOGGER.warn("ERROR: Unable to save or upload screenshot: '" + destinationFile.getAbsolutePath() + "' or upload screenshot to ReportPortal\n"); LOGGER.debug(ExceptionUtils.getStackTrace(e)); } } else { - LOGGER.info("Driver is not instantiated for this test"); + LOGGER.warn("Driver is not instantiated for this test"); } }