Shaun,
Prior to version 2 of WoW, addons were able to directly target by name. PvPLog would pick up the attackers from the combat log, target them, and collect the information it needed from them. It actually collected this information at the time of death (either theirs or yours).
Since version 2 of WoW, addons can no longer change the target at will. Addons can gather information only about a
UnitId. The UnitId PvPLog is most interested in is "target". Since PvPLog can't wait until death to collect information anymore, it captures information about every "target" it sees (Blizzard provides an event, PLAYER_TARGET_CHANGED, that is used to gather this information). PvPLog also keeps a list of names captured from the combat log (again, Blizzard provides events for each line in the log).
At the time of a death, PvPLog checks to see if it has the information about the name that was involved. If the information is available, then its used. If the information isn't available, then the death goes unrecorded.
I have tried to be very clever about how much information I keep around. If I keep the information too long, it becomes stale (the enemy's level, for instance), and if I keep too much, the performance suffers. PvP battles can get complicated with multiple players on each side pounding on each other. Out in the world, you can add hostile NPCs to this mix. As evidenced by the contents of this thread, sometimes I wasn't as clever as I should have been.
Add to this support for multiple languages most of which I do not have access to and you can see that my job is sometimes complicated. Fortunately, I have a community of people such as yourself that are willing to pitch in and help when needed. I've concentrated my efforts recently on adding better debugging abilities to PvPLog so that my community of helpers can provide the information I need to make PvPLog better. Together we can make it happen!
Regards,
Brad