Discussion (3)0
Log in or sign up to continue

Assumedly, you also may only want to see "new" additions to the log file. My thoughts on this would be as follows;

Method 1 - Using COS code throughout

  1. Take a snapshot of the existing ens.log/cconsole.log, loading it into Cache as an Object/Global
  2. Every "n" seconds, rescan the existing log file.
  3. If new lines have appeared report them, write to text file, email, text etc. them
  4. Goto step 1

Method 2 - Using OS tools

  1. Take a snapshot of the existing log file into a copy text file
  2. Every "n" seconds, use an OS tool to compare this file with the current log file (e.g. diff in Unix etc.)
  3. If different, report the differences, write to text file, email, text etc. them
  4. Goto step 1

If you really only want "...to write the event log to the text file..." then you can either use COS or a simple copy command at the OS level to copy the log file to another text file