user46484 Published in September 19, 2018, 3:46 am
I have a task to make some kind of logger application and integrate it in source code of already existing programm on linux.
There are lots of std::cout in it. So, I need to intercept them, add information like name of function from which it was called and send all of this to log function. There are several threads already and I want to avoid creating another one.
Main question: "how can I bind cout call to log function call whithout changing all source code? I need to get final string from cout and send it to logger."
So I'll be glad to get any information, suggestion, ideas and advices.
c++ redirect stream
share|improve this question
edited Jan 12 at 13:24
asked Jan 12 at 11:20
Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.
Browse other questions tagged c++ redirect stream or ask your own question.