<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3ATextLogSetIncrementalSaving</id>
	<title>API:TextLogSetIncrementalSaving - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.returnofreckoning.com/index.php?action=history&amp;feed=atom&amp;title=API%3ATextLogSetIncrementalSaving"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:TextLogSetIncrementalSaving&amp;action=history"/>
	<updated>2026-10-17T17:54:05Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://wiki.returnofreckoning.com/index.php?title=API:TextLogSetIncrementalSaving&amp;diff=30793&amp;oldid=prev</id>
		<title>Maintenance script: UI Lua API import (WAR 1.4.8)</title>
		<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:TextLogSetIncrementalSaving&amp;diff=30793&amp;oldid=prev"/>
		<updated>2026-10-16T19:50:12Z</updated>

		<summary type="html">&lt;p&gt;UI Lua API import (WAR 1.4.8)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{LuaApi|group=TextLog}}&lt;br /&gt;
Turns on or off writing each new entry of a text log to a file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TextLogSetIncrementalSaving(logName, enabled, fileName)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Arguments ==&lt;br /&gt;
;logName : &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; – Name of the text log.&lt;br /&gt;
;enabled : &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; – &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; to write new entries to the file.&lt;br /&gt;
;fileName : &amp;lt;code&amp;gt;wstring&amp;lt;/code&amp;gt; – Path of the log file, for example &amp;lt;code&amp;gt;L&amp;quot;logs/uilog.log&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
Nothing.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* When &amp;lt;code&amp;gt;fileName&amp;lt;/code&amp;gt; differs from the file the log already uses, the client opens the new file:&lt;br /&gt;
** The path must be inside the client&amp;#039;s log directory. Otherwise the &amp;#039;&amp;#039;is not in the log directory&amp;#039;&amp;#039; error is raised.&lt;br /&gt;
** If the file already exists, it must be a UTF-16 file that starts with a byte-order mark. Otherwise the &amp;#039;&amp;#039;already exists and is not a unicode log file&amp;#039;&amp;#039; error is raised and the file is left alone.&lt;br /&gt;
* Calling again with the same file name does not reopen the file.&lt;br /&gt;
* The file is opened even when &amp;lt;code&amp;gt;enabled&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;. Entries are written only while &amp;lt;code&amp;gt;enabled&amp;lt;/code&amp;gt; is &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; and the log itself is enabled ([[API:TextLogSetEnabled|TextLogSetEnabled]]).&lt;br /&gt;
* Each entry is written as one line: &amp;lt;code&amp;gt;[YY/MM/DD][HH:MM:SS] &amp;lt;/code&amp;gt; followed by the filter name and the text, with nothing between them, ended by a carriage return and line feed. The filter name is the name given with [[API:TextLogAddFilterType|TextLogAddFilterType]], or nothing.&lt;br /&gt;
* Only entries added after this call are written. Existing entries are not saved.&lt;br /&gt;
* &amp;lt;code&amp;gt;enabled&amp;lt;/code&amp;gt; must be a real boolean.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
* &amp;lt;code&amp;gt;Error in function call &amp;#039;TextLogSetIncrementalSaving&amp;#039;: Text Log %s does not exist&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;Error in function call &amp;#039;TextLogSetIncrementalSaving&amp;#039;: File &amp;#039;%s&amp;#039; is not in the log directory &amp;#039;%s&amp;#039;.&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;Error in function call &amp;#039;TextLogSetIncrementalSaving&amp;#039;: File &amp;#039;%s&amp;#039; already exists and is not a unicode log file. You may not write to this file.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
From &amp;lt;code&amp;gt;ea_uidebugtools/source/debugwindow.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TextLogSetIncrementalSaving( &amp;quot;UiLog&amp;quot;, DebugWindow.Settings.logsOn, L&amp;quot;logs/uilog.log&amp;quot;);&lt;br /&gt;
TextLogSetEnabled( &amp;quot;UiLog&amp;quot;, DebugWindow.Settings.logsOn )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:TextLogGetIncrementalSaving|TextLogGetIncrementalSaving]]&lt;br /&gt;
* [[API:TextLogLoadFromFile|TextLogLoadFromFile]]&lt;br /&gt;
* [[API:TextLogSaveLog|TextLogSaveLog]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>