mreddington commented on a change in pull request #662:
URL: https://github.com/apache/geode-native/pull/662#discussion_r500552393



##########
File path: cppcache/integration/test/PartitionRegionOpsTest.cpp
##########
@@ -46,11 +48,21 @@ using apache::geode::client::RegionShortcut;
 
 using std::chrono::minutes;
 
+std::string getClientLogName() {

Review comment:
       Oof... Man, I looked into why you're doing this, and I get you, and I'm 
just as sorry.
   
   Can I convince you to add a refactor that will eliminate all this dubious 
file handling? If you look at cppcache/src/Log.cpp, there are 2 places, 2 lines 
each, where we fprintf(stdout... and a flush. What if you replaced both those 
with a write to ::std::cerr? No need to flush, cerr has unitbuf enabled by 
default.
   
   What this should allow you to do, but I'm not exactly familiar with how this 
behaves over a shared object boundary, is you can replace the stream buffer of 
cerr with your own.
   
   ::std::istringstream log_stream;
   auto old_rdbuf = ::std::cerr.rdbuf(log_stream.rdbuf());
   // Test code...
   ::std::getline(log_stream, log_line);
   // etc...
   ::std::cerr.rdbuf(old_rdbuf);




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to