Read Text Log
The Read Text Log object will read
lines in a structured text log file. If you have log files that
change names, you can configure the Read Text Log object to read
from the newest file in a folder that matches a file name
pattern.
Note: For
the Read Text Log object to work correctly, every line in the text
log file must begin with a timestamp.
How it is used
The Read Text Log object can be used
to check a log for errors and then take corrective action on the
server that is creating the log or send an email to an
administrator to escalate the issue.
Configuration
To configure the Read Text Log object
you will need to the name of the log file that you are reading. You
will also need to know the format of the timestamps in the
log.
Details Tab
File
|
Select and type the name of the
log file that will be read. You can also use the ellipsis
(...)
button to browse for the file.
|
The most recent file in the
folder
|
Select and type the folder where
the most recent file that matches the pattern that you specify will
be read. You can also use the ellipsis (...) button to
browse for the folder.
|
Matching this pattern
|
Type the file name pattern that
will be used to find the log file that will be read. You can use
the '*' and '?' wildcards to specify the pattern. These wildcards
behave in the same way as the Windows Command Prompt.
|
Read
|
Select and specify the dates
that the lines you are reading are from:
•
|
lines
between the dates - Select and specify the begin date and
end date that make up the range that will be read. The dates that
you specify must match the Timestamp
format.
|
•
|
lines more
recent than - Select and specify the oldest date of the logs
that will be read. The date that you specify must match the
Timestamp format.
|
•
|
new
lines - Select to read all the logs that have not previously
been read by the Read Text Log object.
|
|
Timestamp format
|
Specify the format of the
timestamp of the logs. For more information on how to specify the
timestamp format, see Timestamp Format Codes.
|
Timestamp Format Codes
To specify a timestamp format, you
will need to enter the codes that represent each part of the
timestamp in the same pattern that they appear in the text
log.
Code
|
Description
|
%y
|
Year in two digits. For example,
in this format '2005' would be represented as '05'.
|
%Y
|
Year in four digits.
|
%m
|
Month in two digits. For
example, in this format 'September' would be represented as
'09'.
|
%d
|
Day in two digits.
|
%H
|
Hour in two digits in the 24
hour format. For example, in this format '1 pm' would be
represented as '13'
|
%M
|
Minutes in two digits.
|
%S
|
Seconds in two digits.
|
%s
|
Milliseconds in three
digits.
|
Here are some examples of dates and
their corresponding timestamp format.
Date
|
Format
|
03/26/2001 14:07:46
|
%m/%d/%Y %H:%M:%S
|
[03/26/2001] [14:07:46]
|
[%m/%d/%Y] [%H:%M:%S]
|
15-11-01 02:09:45:056
|
%d-%m-%y %H:%M:%S:%s
|
Note: Dates
with words describing the day or month are not supported. For
example, 'May 9, 2005' or 'Wednesday September 20, 2006'.
Available Published Data
Name
|
Description
|
Full path and name of the log
file
|
The full path of the log file
that is being read.
|
Number of lines matching the
condition
|
The number of lines that were
read.
|
For each line read
|
Full line matching the filter,
including timestamp
|
The entire line as it appears in
the log file.
|
Timestamp of matching line
|
The timestamp of the line that
was read.
|
Message of matching line
|
The log message of the line that
was read.
|