Forum Discussion
Hrm... that code looks familiar... ;)
If I understand this correctly... you want some way that, whenever beginlog is called, you keep track of it in some array including a time stamp of when it happened.
Here's what I threw together real quick:
function GeneralEvents_OnLogCreateNode(Sender, LogParams)
{
Log.Message('Does this work? ' + aqConvert.DateTimeToFormatStr(aqDateTime.Time(), '%H:%M'));
}
function test(){
TestLogUtils.beginlog('just checking');
TestLogUtils.beginlog('checking again');
TestLogUtils.endlog();
TestLogUtils.endlog();
}
I'm using the OnLogCreateNode event handler which fires every time a folder is created in the Log (that's what AppendFolder does). I'm using a combination of aqDataTime and aqConvert to time stamp it as well.
So... probably some sort of implementation of that event handler which would write out too a global variable or array every time begin log is called with the text of what was called and the time stamp...
Does this help?
P.S. Please attribute the code if you go forward with this as per the Creative Commons license. Thanks!
Will definitely share the code with the community :)
Question:
How do I get the name of the function that I am currently running (hence executing its beginlog)?