Read Text Log
Updated: May 13, 2016
Applies To: System Center 2012 SP1 - Orchestrator, System Center 2012 - Orchestrator, System Center 2012 R2 Orchestrator
The Read Text Log activity will read lines in a structured text log file. If you have log files that change names, you can configure the Read Text Log activity to read from the newest file in a folder that matches a file name pattern. The Read Text Log activity 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.
For the Read Text Log activity to work correctly, every line in the text log file must begin with a timestamp.
Before you configure the Read Text Log activity, you need to determine the following:
The log file name you are reading.
The timestamps format in the log.
Use the following information to configure the Read Text Log activity.
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 this 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.
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 entered Timestamp format.
new lines: Select to read all the logs that have not previously been read by the Read Text Log activity.
Specify the format of the timestamp of the logs. For more information on how to specify the timestamp format, see the following Timestamp Format Codes table.
Read the last lines
Enter the number of lines.
Timestamp Format Codes
Year in two digits. For example, in this format '2005' would be represented as '05'.
Year in four digits.
Month in two digits. For example, in this format 'September' would be represented as '09'.
Day in two digits.
Hour in two digits in the 24 hour format. For example, in this format '1 pm' would be represented as '13'
Minutes in two digits.
Seconds in two digits.
Milliseconds in three digits.
Here are some examples of dates and their corresponding timestamp format.
The following table lists the published data items.
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.