maybe you are wondering why the IrrLicht Logger can't write its messages into a LogFile.
Well, i don't know ^^
whatever, i've found a nice way, to use the IrrLicht Logger also for writing LogFiles by capturing the LogText in the EventReceiver and then write it down in a textfile. So you don't have to recompile the Engine and the messages in the console are still there.
here is the code of the EventReceiver.h i use for this:
Code: Select all
#include <fstream>
class MyEventReceiver : public IEventReceiver
{
public:
virtual bool OnEvent(SEvent event)
{
if (event.EventType == irr::EET_LOG_TEXT_EVENT)
{
std::fstream LogFile("LogFile.log",std::ios::out|std::ios::app);
LogFile << (event.LogEvent.Text) << std::endl;
LogFile.close();
return true;
};
return false;
}
};