• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 1.X+ How to save players log?

dervin13

Active Member
Joined
Apr 26, 2008
Messages
459
Solutions
1
Reaction score
28
How to save players log?

I tried to use this in source but didnt work

C++:
Logger::getInstance()->eFile("players/" + player->getName() + ".log", text, true);
 
How to save players log?
What engine?
What is players log?

Do you want to save a lot of data from OTS ex. all what players talk on public and private channels?
Just dump it to OTS console (ex. std::cout << "player talk:" << player->getGUID() << ", whatever log:" << text << std::endl)
and save OTS console log to file using > or >> in Bash script ex. ./tfs >> console.log.
It can probably handle 100k messages per second easily, so don't try to write own more efficient events logger.

Then you can use cat console.log | grep 'player talk:123,' to analyse what player with ID 123 said.
 
Back
Top