Get stdout after each test in xctest

I would like to get the stdout after each test is completed in xctest. I have got the idea that I need to use XCTestObservation together with testCaseDidFinish. But I don't know what further I need to make it work. So my question is: Can I get the stdout after each test case is completed in xctest?