Recent Topics

Ads

Assorted addon-making related questions to people who know API and LUA

Here you can post addons, or anything related to addons.
Forum rules
Before posting on this forum, be sure to read the Terms of Use
User avatar
lolwut
Posts: 29

Assorted addon-making related questions to people who know API and LUA

Post#1 » Tue Jul 20, 2021 3:11 am

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!
Ain't Nobody Gafflin Me.

Ads
User avatar
Phantasm
Posts: 676

Re: Assorted addon-making related questions to people who know API and LUA

Post#2 » 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

User avatar
lolwut
Posts: 29

Re: Assorted addon-making related questions to people who know API and LUA

Post#3 » Wed Jul 21, 2021 7:18 pm

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.
Ain't Nobody Gafflin Me.

User avatar
Omegus
Posts: 1373

Re: Assorted addon-making related questions to people who know API and LUA

Post#4 » Wed Jul 21, 2021 8:26 pm

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.
Zomega: RR8x Zealot

Who is online

Users browsing this forum: No registered users and 15 guests