Redirecting stdout to ofLog?

Has anybody succeeded in redirecting stdout to ofLog?

If you now use some ofLog implementation (ie some log window) it only captures ofLog messages but no printfs.

Reading through ofLog it doesn’t seem to capture stdout anywhere?

Arnaud

no ofLog only redirects it’s own calls not stdout, if you want to redirect stdout you would need to do it apart using some c or c++ call

I’ve created a PR for ofxImGui which add an option to capture stdout:

In theory this could be done for any loggerchannel.

Rg,

Arnaud

how can you implement ofxImGui::loggerChannel

I’m not sure I understand your question.

Sorry, i been trying to get ofxImgui to show a console with the ofLog content but i havent been able to, so i dig into the ofxImGui code and found the logger channel but dont know how to used it either so thought you may point me to a way to use it

Here’s an example: