Trying to make a live log viewer on Windows.
There is a log file and my shell runs windows commands such as 'type log_file' or 'tail -f log_file'. ( with windows tail binary ).
So, I want to see the latest log entries in GUI automatically. The new entries are displayed in a textarea.
-- calling method
dim getLogDataShell_Run As New getLogDataShell finalCommand = " cd " + DirectoryName + " & " + "type " + FileName getLogDataShell_Run.Execute finalCommand If getLogDataShell_Run.ErrorCode <> 0 Then Msgbox "getLogDataShell_Run Error: " + Str(getLogDataShell_Run.ErrorCode) Else Logging("Check: getLogDataShell_Run executed : " + FileName ) End If
-- DataAvailable event
Dim ResultBuffer As String ResultBuffer = Me.ReadAll Logging("DEBUG: getLogDataShell / DataAvailable event") MainWindow.MainContainerScreen.JOBMonitorList_area.AppendText ResultBuffer Logging("DEBUG: ResultBuffer(getLogDataShell): " + ResultBuffer)
It seems that the shell command is executed, but DataAvailable event never got fired.
Can you let me know which point I am missing?