I am using Rest Assured along with TestNG and Extent reports. I have set the Restassured log config as user defined and getting the printstream then writing it to extentreport. everything works fine in single threaded execution. when i run the test in multiple threads, I see the logs are collapsed and it is not getting written specific to test methods in the extent report. it could because Restassured config is static.
this is my :
@BeforeClass
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintStream printStream = new PrintStream(baos, false);
LogConfig config = new LogConfig(printStream, true);
RestAssured.config = RestAssured.config().set().logConfig(config);
@AfterClass
new CustomLogger().log_request_responses(baos.toString(), extentTest);
could someone suggest how to achieve this or is there anyother way to have custom log filters.