Friend Function AppendLogFile(ByVal text As String)
Dim done As Boolean = False
Dim outtext As String
If gblGame.Debugging Then
If File.Exists(gblGame.LogFile) Then
While Not done
Try
Dim myStreamWriter As StreamWriter
outtext = "Computer = <" & gblGame.PlayerList & ">" & (Now.ToLongTimeString)
outtext += text & vbCrLf
myStreamWriter = File.AppendText(gblGame.LogFile)
myStreamWriter.Write(outtext)
myStreamWriter.Flush()
myStreamWriter.Close()
done = True
Catch ex As Exception
End Try
End While
Else
MsgBox("Attempted to Output This Message to Closed Log File: " & text)
End If
End If
End Function