• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/
  • Weve updated the Tripwire Privacy Notice under our Policies to be clearer about our use of customer information to come in line with the EU General Data Protection Regulation (GDPR) rules that come into force today (25th May 2018). The following are highlights of our changes:


    We've incorporated the relevant concepts from the GDPR including joining the EU and Swiss Privacy Shield framework. We've added explanations for why and how Tripwire processes customer data and the types of data that we process, as well as information about your data protection rights.



    For more information about our privacy practices, please review the new Privacy Policy found here: https://tripwireinteractive.com/#/privacy-notice

Mutator that creates a separate log?

Rivimies

FNG / Fresh Meat
Jun 29, 2013
198
2
0
var FileWriter writer;
.....
self.writer = self.Spawn(class'FileWriter');
self.writer.OpenFile("MyFilename", FWFT_Log, ".txt", true, true);
.....
self.writer.Logf("My Text Here");
.....
self.writer.CloseFile();


Logf is probably pretty slow, so it may not be a good idea to write something every tick :D
But I guess, you need something into file on round start/end.
 

Ducky

Super Moderator
May 22, 2011
6,359
237
0
Netherlands
var FileWriter writer;
.....
self.writer = self.Spawn(class'FileWriter');
self.writer.OpenFile("MyFilename", FWFT_Log, ".txt", true, true);
.....
self.writer.Logf("My Text Here");
.....
self.writer.CloseFile();


Logf is probably pretty slow, so it may not be a good idea to write something every tick :D
But I guess, you need something into file on round start/end.
Out of the box you can't use it in the tick event. It doesn't write anything there unless you set property bTickIsDisabled to false (default value is true), though it's not recommendable due to the hight frequency of disk access, however that can be controlled by setting bFlushEachWrite to false (default value is true). If done, then a call to Logf won't directly result in a disk write. Instead it will be written to a RAM buffer and flushed when either the buffer is full or when the file is closed.

In code it looks like:
Code:
self.writer.bTickIsDisabled = false;
self.writer.bFlushEachWrite = false;