atuttle / zoidbox

An IRC bot that (attempts to) bring the knowledge and wit of @boyzoid to ##coldfusion on freenode
3 stars 6 forks source link

!log or !tail #23

Closed ryanguill closed 9 years ago

ryanguill commented 9 years ago
fusiongrokker> It'll take some research but I wonder if we could do a !logs that could dump the last ~20 messages into a gist and then link it or something
<RyanGuill> hmm
<RyanGuill> should be easy, the only part that might be hard is holding on to that rolling buffer in memory (hard being memory usage constraints, not sure what those are)
<fusiongrokker> is there a rolling buffer thing in redis?
<RyanGuill> itd be nice to be able to do !tail 100
<RyanGuill> goo dquestion
<RyanGuill> looks like we could do it with lists - LPUSH RPOP LRANGE
<fusiongrokker> I've got a fire this morning
<RyanGuill> ill put an issue out there
atuttle commented 9 years ago

I also think holding it in app memory will be of limited utility. Offloading it to redis/etc will make it more useful in debugging a crash.

ryanguill commented 9 years ago

agreed. it will take a bit more to run it through redis but shouldn't be bad.

ryanguill commented 9 years ago

probably need to make it a configuration option on how much rolling history to keep (max log).

Will also need to keep in mind to log the output of zoidbox, not just incoming messages (currently we dont listen to output for message counts for instance)

ryanguill commented 9 years ago

remove #maxHistoryPerChannel and add to the output of #taillen Currently doesn't log /me references, need to investigate

ryanguill commented 9 years ago

also do not log channels that dont start with a # so that we don't log PM conversations.