For a particular agent we needed to easily find which documents had caused errors, so that we could run another procedure on those documents. To achieve this I added the following to theCreateLogDoc method of the LogItem class within the "If Not (doc Is Nothing) Then" statement.
'// Log details about the document
Call logDoc.ReplaceItemValue("LogDocUNID", doc.UniversalID)
Call logDoc.ReplaceItemValue("LogDocDatabase", doc.ParentDatabase.FilePath)
Call logDoc.ReplaceItemValue("LogDocServer", doc.ParentDatabase.Server)
This just allowed us to easily build views of the docs in question which we coudl then process with other agents.