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.