Feature request: log continuously into a ring buffer to start logging retroactively
emmericp opened this issue · 5 comments
I've seen some logs that are triggered by some auto-start feature that are missing events during the start that would have been useful to have. I'd love a feature where Transcriptor could behave kind of like a digital oscilloscope that can show you events that happened prior to the trigger.
Rough sketch of the feature as I'd imagine it:
- always have the events registered (controlled by some option, #41 would be useful to have)
- have OnEvent do something like this:
function onEvent(...)
if isLogging() then
logEvent(...)
else
ringBuffer:add(...)
end
end
- make startLogging do something like this:
function newStartLogging()
oldStartLogging()
for item in ringBuffer:iterator() do
logEvent(unpack(item))
end
end
notes:
- prior to startLogging the events aren't processed, just stored as is in the ring buffer
- memory overhead can be made constant, no per-event allocs necessary
In BigWigs we resolve this by having an (optional) feature to start a log on X seconds remaining of a pull timer.
Assuming you are using DBM to auto toggle logging, have you considered such a feature?
Yes, we have that, but we don't always use pull timers and sometimes I'm just like "I wish I would have logged that" because something interesting happened.
I do agree with sentiment that I wouldn't want a buffer running constantly, at least by default. No reason to add overhead out of box.
However, I could see argument for those niche cases, to where such a feature exist and be off by default.
Transcriptor is a dev tool, after all, so no reason not to support additional options if said options don't create unneeded overhead by default. If a dev chooses to opt into the overhead though, that's on them.
if anything, just make paul write it. 🤣 I'm in same boat as you, I just solve this with pull timers, but I do understand classic era is such a different mentality (ook ook brained speed clear gotta go fast, no pull timers). These are same players that wanted speed clear timers in DBM for all the raids (although admittedly I stopped doing that after 3 of them)
@emmericp If this is something you want to work on I'll accept a PR, just make it off by default
@MysticalOS I'd say speed run timers are a solved problem by WCL
obsolete, i built a more sophisticated splitting tool (https://github.com/DeadlyBossMods/DeadlyBossMods/tree/master/DBM-Test/Tools) so i just log the whole raid in a single session