API:TextLogSetEnabled
From RoR Wiki
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–trueto accept new entries,falseto 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.
enabledmust be a real boolean. Passingnilor 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 )
