ofLog events

It would be really great if the ofLog function could send a notification event when a new log message is sent.

This would allow us to write additional log handlers besides cout. (ex. writing to a log file, or GUI console)


the idea for 007 is to use the Poco Logger for ofLog. Poco uses something called Channels, the default one outputs through the console but there’s for example another to output to a file and you can create your own and plug it to the logging system

Old post but on topic and comes up in search…

So with the current version (0073) is it possible to write to the console and a log without creating a custom ofBaseLoggerChannel?

I am trying to debug an app and I am trying:

ofLogToFile(ofGetTimestampString()+".log", false);  

however when I call

ofVideoGrabber grabber;  

nothing is printed to my log even though ofQuickTimeGrabber.cpp contains:

ofLog(OF_LOG_NOTICE, "listing available capture devices");  

ok - listDevices does give some output if i call initGrabber(), otherwise listDevices() returns early

still curious what the proper way to log to the console + a file would be…