The format of the log file that will be parsed is as follows:
- The lines that are to be parsed begin with '##'
- The first component of the record is the severity of the message (i.e. Information,
Error, or Warning)
- The second component of the record is the time stamp. The time stamp is in
the following format: month.day.year.hour.min.sec. (e.g. 02.23.03.13.11.12 which
corresponds to Feb 23, 2003 13:11:12)
- The third component is the text message describing an event.
- The last component is the record ID.
Assume that 'syslog1.log' is the filename of the log file. Here's an example of what the log file can look like:
Initialized on Jan 4, 2003
The following errors occurred while attempting to launch the x program...
## <Error> <02.22.03.10.53.22> Missing library file 00000000.000
## <Error> <02.22.03.10.53.22> Missing class 00000001.000
## <Error> <02.22.03.10.53.22> Missing Environmental Variable 00000002.000
## <Error> <02.22.03.10.53.22> Exception 00000003.000
## <Warning> <02.22.03.10.53.22> Connection without a firewall 00000004.000
System idle...
Host names connecting...
host1.domain.com
host2.domain.com
host3.domain.com
## <Information> <02.22.03.13.11.10> First time user: host3.domain.com
00000005.000
## <Information> <02.22.03.13.11.10> Performing security check host3.domain.com
00000005.001
Security check: host3.domain.com...
## <Warning> <02.22.03.13.11.11> host3.domain.com does not meet
security requirements 00000005.002
Disconnecting host3.domain.com...
## <Information> <02.23.03.13.11.12> host3.domain.com has been disconnected
00000005.003
System idle...
Only the lines that begin with "##" will appear as a log record.