Audit History WEB

This is my code for audit history and its working fine (WEB) I need to modify this code so that it tracks last 5 updated infromation in web

Sub LogAuditEntry(doc As NotesDocument, UserName As String)

Dim session As New NotesSession

Dim dt As New NotesDateTime(Now)

Dim logFldName As String

Dim logItem As NotesItem

Dim counter As Integer

counter = 1

logFldName = “fld_edit_name”

Set logItem = doc.GetFirstItem(logFldName)

While logItem.ValueLength >9500

Set logItem = doc.getfirstitem(logFldName+Cstr(counter))

counter = counter + 1

Wend

Call logItem.AppendToTextList(dt.DateOnly + “–” + dt.TimeOnly + “–” + UserName)

End Sub