Build Log
A build log is an enhanced console output of a build. It is represented by a structured list of the events which took place during the build. Generally, it includes entries on TeamCity-performed actions and the output of the processes launched during the build. TeamCity captures the processes output and stores it in an internal format that allows for hierarchical display.
Viewing Build Log
The log of a specific build is available for browsing on the Build Results page.
The Tree view is the most capable view provided in the web UI. By default, all messages are displayed. Using the View drop-down menu, you can switch from all messages to viewing errors separately, or you can choose Important messages to see the log filtered by "error" and "warning" statuses. You can also use the "Verbose" view level and download a raw build log using the corresponding link.
You can download a full build log in the textual form or as a .zip
archive from the Build Results page by clicking the Download full build log link at the upper right corner. Alternatively, you can use the following URL: http://teamcity:8111/httpAuth/downloadBuildLog.html?buildId=<id>
. It is also possible to download the build log as a .zip
file using the corresponding link in the UI or via the following URL: http://teamcity:8111/httpAuth/downloadBuildLog.html?buildId=&archived=true
.
Customizing Log Output
You can modify the log output using service messages. This includes grouping the log entries in blocks, handling parallel message flows, changing the severity of a log message, and so on.
Build Log Size
It is recommended to keep the build log small and tune build scripts not to print too much into the output. Large build logs are hard to view in the browser and are loading TeamCity infrastructure piping build messages from the agent to the server while the build is running.
It is recommended to print into the output only the messages required to understand the build progress and build failures. The rest of the information should be streamed into a log file and the file should be published as a build artifact. A "good" build log size is megabytes at most.
Partial Build Log Display
When opening large build logs, TeamCity displays a part of it to avoid browser hanging. You can view the full build log on clicking the corresponding link.
The display threshold is set to 5M characters.
ANSI-style Coloring in Build Log
TeamCity build logs render clickable hyperlinks and support ANSI-style escape color codes by default: if your tool produces a colored console output, you will see in the build log in TeamCity. See the related feature request for the full list of supported sequences.