We have a backup software that creates log files every time a backup is run. We want to email a portion of that log file to each customer so that they can see if their backup was successful or failed each day. I found a program to email out the text files, but now I need something that will pull the data out of the log file. We don't want our clients seeing 10k lines of items that are backed up. They just need to see the 5 lines that matter to them. Does anyone know how to write this or have a program they use to parse information?
This is an example of what the text portion of the log files would look like that we want to extract:
[11-Jun-2007:10:58:01] BACKUP SUMMARY:
[11-Jun-2007:10:58:01] Total no. of volumes processed: 1
[11-Jun-2007:10:58:01] Total no. of files processed: 2
[11-Jun-2007:10:58:01] Total no. of files skipped: 0
[11-Jun-2007:10:58:01] Total size of compressed files: 0.0001MB (0.08KB)
[11-Jun-2007:10:58:01] Total size of uncompressed files: 1.7510MB (1793.00KB)
[11-Jun-2007:10:58:01] Total upload time: 00:00:01
Above all of this is each file that was backed up. Once it is extracted, we want to put it in an email and send it out.
This is an example of what the text portion of the log files would look like that we want to extract:
[11-Jun-2007:10:58:01] BACKUP SUMMARY:
[11-Jun-2007:10:58:01] Total no. of volumes processed: 1
[11-Jun-2007:10:58:01] Total no. of files processed: 2
[11-Jun-2007:10:58:01] Total no. of files skipped: 0
[11-Jun-2007:10:58:01] Total size of compressed files: 0.0001MB (0.08KB)
[11-Jun-2007:10:58:01] Total size of uncompressed files: 1.7510MB (1793.00KB)
[11-Jun-2007:10:58:01] Total upload time: 00:00:01
Above all of this is each file that was backed up. Once it is extracted, we want to put it in an email and send it out.