Skip to content

Return of Reckoning

Wiki

RoR Wiki

API:TextLogSetEnabled

From RoR Wiki
Revision as of 19:50, 16 October 2026 by Maintenance script (talk | contribs) (UI Lua API import (WAR 1.4.8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

UI Lua API · TextLog functions
Version: WAR 1.4.8

Turns a text log on or off.

TextLogSetEnabled(logName, enabled)

Arguments

logName
string – Name of the text log.
enabled
boolean – true to accept new entries, false to drop them.

Returns

Nothing.

Details

  • While a log is disabled, entries added to it are thrown away: they are not stored, not saved to file and do not fire the update event. Entries already in the log stay.
  • Logs start enabled when created with TextLogCreate.
  • enabled must be a real boolean. Passing nil or a number raises an Invalid Parameters error.
  • The function needs at least two arguments and only reads the last two. Any extra arguments placed in front of them are ignored.

Errors

  • Error in function call 'TextLogSetEnabled': Text Log %s does not exist

Example

From interfacecore/interfacecore.lua:

TextLogSetEnabled( "System", true )

Switching the UI debug log on together with file saving, from ea_uidebugtools/source/debugwindow.lua:

TextLogSetIncrementalSaving( "UiLog", DebugWindow.Settings.logsOn, L"logs/uilog.log");
TextLogSetEnabled( "UiLog", DebugWindow.Settings.logsOn )

See also