XtrmJosh
12-04-2012, 06:34 PM
So the logging feature has been added (possibly one of my most necessary features, I'll use this more than anything!)
It would be nice to see log files like this:
[Timestamp] called depotdeposit(1234, 5678, {1, 1234}) from XenoLuaLib.lua with return true
[Timestamp] called closewindows() from MyScript.lua with return false
[Timestamp] connection to game server lost
[Timestamp] client closed
If a function returns null, 0, or false, more data on where it went wrong would be useful, aka the escape line number of the file which the function exists in (aka for 2nd log entry above, line 50 of file MyScript.lua then perhaps even the line of code including, if necessary, the function called from that location with any parameters in place).
This would be really nice for testing & producing scripts more quickly and efficiently. It could also be an option in the looter, targeting, walker, healer, etc to log events... Not sure what your internal functions are named, but I think I've seen a bit of source on your VLogs, showing that they are sensible...
[Timestamp] called say('exura') from healWorkerThread while gethealth() returned 100 and getmana() returned 20
And so on, for targeting it might be nice just to see when it is switching target, and the requirements which were met in order to allow it to... E.g:
[Timestamp] attacking Ghoul due to no current target
[Timestamp] attacking Skeleton due to priority of Skeleton higher than priority of Ghoul
[Timestamp] using item 1234 because creaturecount("Ghoul") is higher than 3
And so on.
Hope I didn't drag this out too much. Logging is really useful, and it could be a really good feature to have!
It would be nice to see log files like this:
[Timestamp] called depotdeposit(1234, 5678, {1, 1234}) from XenoLuaLib.lua with return true
[Timestamp] called closewindows() from MyScript.lua with return false
[Timestamp] connection to game server lost
[Timestamp] client closed
If a function returns null, 0, or false, more data on where it went wrong would be useful, aka the escape line number of the file which the function exists in (aka for 2nd log entry above, line 50 of file MyScript.lua then perhaps even the line of code including, if necessary, the function called from that location with any parameters in place).
This would be really nice for testing & producing scripts more quickly and efficiently. It could also be an option in the looter, targeting, walker, healer, etc to log events... Not sure what your internal functions are named, but I think I've seen a bit of source on your VLogs, showing that they are sensible...
[Timestamp] called say('exura') from healWorkerThread while gethealth() returned 100 and getmana() returned 20
And so on, for targeting it might be nice just to see when it is switching target, and the requirements which were met in order to allow it to... E.g:
[Timestamp] attacking Ghoul due to no current target
[Timestamp] attacking Skeleton due to priority of Skeleton higher than priority of Ghoul
[Timestamp] using item 1234 because creaturecount("Ghoul") is higher than 3
And so on.
Hope I didn't drag this out too much. Logging is really useful, and it could be a really good feature to have!