okay so i spent some time and got a solution for you.
std::ofstream myfile;
myfile.open ("log.txt");
Notify::ptr()->set_ostream_ptr(&myfile,0);
this will put everything into a file of your liking.Note that all nout usages will be put into the file now.You can still use cout and cerr or printf normally for your own stuff.
std::ostream *no = new fstream;
Notify::ptr()->set_ostream_ptr(no,0);
Thats a blank stream if you didnt want nout to do anything.
NOTE;
Im didnt try the config.prc settings.
i think you might have to put 1 as that second variable if you are going to replace it later.