Use a prefix in front of output lines to have output listed in
a labeled category in the step log.
This task assumes that you have already created a selector, server,
and project. It assumes that you are using a server with an operating system
that accepts the echo command (for example, Windows, Linux, or UNIX).
You can include an uppercase label at the beginning of any line of
output. When a line begins with a label, Build Forge repeats the output in
the category with the same name as the label, or creates a new category if
the category does not already exist. The system recognizes a label when it
follows these rules:
- The label must be composed solely of uppercase letters (no spaces or punctuation)
and followed by a colon. SPACESHIPS: is valid; Space Ships: is not.
- The label must be at least 3 letters long.
After a line that begins with a label, subsequent output lines are copied
to the same category until you use a new label. Use the procedure below to
try out this feature.
- Create a new step in one of your projects. Give the new step a
name like LabeledLogOutput.
- For the step's command, enter the following text.
echo SPACESHIPS: Voyager I
echo Voyager II
echo EXEC: (You can add text to existing categories as well)
- Run the project. When it completes, view the log for the new step.
You should see output similar to the following.
Figure 1. Labeled Log Output
Note: You have to click on the new SPACESHIPS category to expand
its contents. The system displays the category name as a Show option; you
can select or deselect the SPACESHIPS check box to show or hide the category.
Whenever you prefix an output line with an all-caps name and a colon,
the system copies the output to a labeled category.