Page 1 of 1
Assorted addon-making related questions to people who know API and LUA
Posted: Tue Jul 20, 2021 3:11 am
by lolwut
Hi!
I'm no addon maker, but I have a useful addon idea that's been taking a shape for last few weeks, and as I go on I need some advice on how to make it better. In this thread I'm gonna ask questions with a hope they get a useful answer that I'm going to incorporate into my addon.
First question would be
Is there any way to not include timestamps in log files? If no, it is not a big deal, but I would like to reduce log file size as much as I can, and timestamps are the first thing I would cut off.
Thanks!
Re: Assorted addon-making related questions to people who know API and LUA
Posted: Tue Jul 20, 2021 8:30 am
by Phantasm
If it is to boost performance, all you really need is to disable combat log - big fights is the place where ppl are struggling with low fps. You can do it with Enemy addon.
/script TextLogSetEnabled("Combat", false) - turns OFF combat log
/script TextLogSetEnabled("Combat", true) - turns ON combat log
Re: Assorted addon-making related questions to people who know API and LUA
Posted: Wed Jul 21, 2021 7:18 pm
by lolwut
Phantasm wrote: Tue Jul 20, 2021 8:30 am
If it is to boost performance, all you really need is to disable combat log - big fights is the place where ppl are struggling with low fps. You can do it with Enemy addon.
/script TextLogSetEnabled("Combat", false) - turns OFF combat log
/script TextLogSetEnabled("Combat", true) - turns ON combat log
Thanks, but that's not what I was talking about.
I'm making an addon that dumps some data when triggered to a log file in %WARROOT%\logs, and timestamp in these files is redundant and unnecessary, I would like to get rid of it.
Re: Assorted addon-making related questions to people who know API and LUA
Posted: Wed Jul 21, 2021 8:26 pm
by Omegus
Not to my knowledge. These are the TextLog functions available to the addon system for reading/writing:
TextLogAddEntry()
TextLogAddFilterType()
TextLogAddSingleByteEntry()
TextLogCreate()
TextLogDestroy()
TextLogDisplayShowScrollbar()
TextLogGetEnabled()
TextLogGetEntry()
TextLogGetIncrementalSaving()
TextLogGetNumEntries()
TextLogLoadFromFile()
TextLogSaveLog()
TextLogSetEnabled()
TextLogSetIncrementalSaving()
There are other functions to show/hide the timestamp in the UI, but I wasn't ever able to find any to stop it from being written to the saved log files.