We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attach Test ScreenShots to Logs in reportportal Using TestNG and Log4j2 With java getting error
On the console - " [INFO ] 2022-08-30 13:39:30.541 [Test worker] CoreLogger - com.epam.reportportal.message.ReportPortalMessage@1d0305fb"
Versions:
code -
protected void takeScreenshot(WebDriver driver, String methodName) { ReportPortalMessage message = null; TakesScreenshot scrShot = ((TakesScreenshot) driver); File fileSourceFile = scrShot.getScreenshotAs(OutputType.FILE); logger.info("Inside screenshot method"); String strDirectory = System.getProperty("user.dir"); File fileDestinationFile = new File(strDirectory + "/test-outputs/Screenshots/" + methodName + ".jpg"); try { FileUtils.copyFile(fileSourceFile, fileDestinationFile); String rp_message = "test message for ReportPortal"; message = new ReportPortalMessage(fileSourceFile, rp_message); } catch (IOException e) { e.printStackTrace(); } logger.info(message); }
The text was updated successfully, but these errors were encountered:
@sharathhatter1 I don't see any error messages. Please provide more details.
Sorry, something went wrong.
@HardNorth I am not seeing the error.
But I donot see my logs in the reportportal io
I have added below prop in the log4j properties file
rootLogger = INFO, reportportal appender.reportportal=com.epam.ta.reportportal.log4j.appender.ReportPortalAppender appender.reportportal.layout=org.apache.log4j.PatternLayout appender.reportportal.layout.ConversionPattern=[%d{HH:mm:ss}] %-5p (%F:%L) - %m%n
Log4j Dependency - 2.17.2
Only errors are showing in the report porter, rest of the logs are not shown. Im trying to attach screenshot also and not seeing it.
@sharathhatter1 You are using Log4j 1.x.x configuration file format to configure Log4j 2.17.2. It won't work, they are incompatible.
Log4j 1.x.x
Log4j 2.17.2
Please read carefully our configuration guide: https://github.com/reportportal/logger-java-log4j#configuration---log4j2
@sharathhatter1 and make sure this file size is less then 16mb. it's a default configuration for this request.
No branches or pull requests
Attach Test ScreenShots to Logs in reportportal Using TestNG and Log4j2 With java getting error
On the console - " [INFO ] 2022-08-30 13:39:30.541 [Test worker] CoreLogger - com.epam.reportportal.message.ReportPortalMessage@1d0305fb"
Versions:
code -
The text was updated successfully, but these errors were encountered: