<?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%3ATextLogAddEntry</id>
	<title>API:TextLogAddEntry - 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%3ATextLogAddEntry"/>
	<link rel="alternate" type="text/html" href="https://wiki.returnofreckoning.com/index.php?title=API:TextLogAddEntry&amp;action=history"/>
	<updated>2026-10-18T01:23:22Z</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:TextLogAddEntry&amp;diff=30775&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:TextLogAddEntry&amp;diff=30775&amp;oldid=prev"/>
		<updated>2026-10-16T19:49:55Z</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;
Adds a line of text to a text log.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TextLogAddEntry(logName, filterType, text)&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, for example &amp;lt;code&amp;gt;&amp;quot;Chat&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
;filterType : &amp;lt;code&amp;gt;number&amp;lt;/code&amp;gt; – Filter type of the entry. Cut to a whole number. For the chat logs these are the values in &amp;lt;code&amp;gt;SystemData.ChatLogFilters&amp;lt;/code&amp;gt;.&lt;br /&gt;
;text : &amp;lt;code&amp;gt;wstring&amp;lt;/code&amp;gt; – The text. It must be a wide string.&lt;br /&gt;
&lt;br /&gt;
== Returns ==&lt;br /&gt;
Nothing.&lt;br /&gt;
&lt;br /&gt;
== Details ==&lt;br /&gt;
* Nothing is added if the log is disabled ([[API:TextLogSetEnabled|TextLogSetEnabled]]) or if the entry&amp;#039;s filter type is switched off in the log.&lt;br /&gt;
* If the log already holds as many entries as its entry limit, the oldest entries are removed first. A log with an entry limit of 0 stores nothing.&lt;br /&gt;
* In the text, &amp;lt;code&amp;gt;&amp;amp;lt;BR&amp;amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;amp;lt;br&amp;amp;gt;&amp;lt;/code&amp;gt; become a line break and &amp;lt;code&amp;gt;&amp;amp;lt;P&amp;amp;gt;&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;&amp;amp;lt;p&amp;amp;gt;&amp;lt;/code&amp;gt; become two line breaks.&lt;br /&gt;
* The entry is stamped with the local time (shown by [[API:LogDisplaySetShowTimestamp|LogDisplaySetShowTimestamp]] and returned by [[API:TextLogGetEntry|TextLogGetEntry]]).&lt;br /&gt;
* If incremental saving is on (see [[API:TextLogSetIncrementalSaving|TextLogSetIncrementalSaving]]), the entry is also written to the log file as &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.&lt;br /&gt;
* The log&amp;#039;s update event (see [[API:TextLogGetUpdateEventId|TextLogGetUpdateEventId]]) fires with &amp;lt;code&amp;gt;SystemData.TextLogUpdate.ADDED&amp;lt;/code&amp;gt; and the filter type.&lt;br /&gt;
* Every LogDisplay that shows the log picks up the new entry.&lt;br /&gt;
&lt;br /&gt;
== Errors ==&lt;br /&gt;
* &amp;lt;code&amp;gt;Error in function call &amp;#039;TextLogAddEntry&amp;#039;: Text Log %s does not exist&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Example ==&lt;br /&gt;
Printing a message to the chat window, from &amp;lt;code&amp;gt;easystem_utils/source/mailutils.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
TextLogAddEntry( &amp;quot;Chat&amp;quot;, SystemData.ChatLogFilters.MISC, displayString )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Filling an addon-created log, from &amp;lt;code&amp;gt;interfacecore/source/eularocwindow.lua&amp;lt;/code&amp;gt;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
for index = 0, #StringTables.EULAROC&lt;br /&gt;
do&lt;br /&gt;
    TextLogAddEntry( &amp;quot;EULAROCLog&amp;quot;, 1, GetStringFromTable( &amp;quot;EULAROC&amp;quot;, index ) )&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
* [[API:TextLogAddSingleByteEntry|TextLogAddSingleByteEntry]]&lt;br /&gt;
* [[API:TextLogAddFilterType|TextLogAddFilterType]]&lt;br /&gt;
* [[API:TextLogGetEntry|TextLogGetEntry]]&lt;br /&gt;
* [[API:TextLogClear|TextLogClear]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>