Auto-increment logging filename


Recommended Posts

Probably the easiest way is with the registry. Lets assume you have some script to start the logging set:


In front of that script put:

private lognum = registry.lognum


registry.lognum = lognum

logging.mylog.strFileName = "c:\mydata\data_"+doubletostr(lognum)+".dat"


You could technically do this all with just the registry variable I suppose... Note that registry.lognum will default to 0 until you set it to something else.

Note that you can actually change the logging file name without stopping the logging set. The logging set will simply close the current file and open the new file name.

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.