Build status from server logs

We are looking to collect the logs from our Teamcity Server logs for analysis centrally.  I'm wondering if there's a logging configuration available to store the success or failure of a build in the server logs separate from the detailed build logs per-agent.


Hello Wayne,

You can get the information about the build statuses from TeamCity server via REST API. Is it what you are looking for? If not, then please describe your use case in more details.


While we could get the status of the builds via API, that would mean something retrieving that information and storing it elsewhere for review at a later date.  If the data were available in the server logs, we could simply send it down with our standard log aggregation.

Something like this is the closest to what I'd like to accomplish.  I was hoping there may be an easier way.


There is not special feature to print build status in log. As workaround you can add a build step in the end, that will run "Always, even if build stop command was issued", get the build status via REST API and print it into the build log. 


Dear supports,

It's been a year, and we upgraded team city server to 9.1.6. I'd like to re-visit this issue.

1. Can team city include build status into team city server log after a build finishes? Such as turn on DEBUG option. Now what we got is like below. There is no information about if the build was successful or failed.

[2017-05-04 21:57:46,399] INFO - tbrains.buildServer.ACTIVITIES - Finished build RAINIER :: R12.0 [Java 8] {id=Biit_R120Java8, internal id=bt3170} #wip-r12-son.75bedf7264c4.51325 {build id=292347, promotion id=292347, branch=wip-r12-son, history=false, agent="7b2ed2ff8107" {id=15}, triggered by "Mercurial" (##vcsName='mercurial'). Started Thu May 04 21:26:00 UTC 2017}


2. Can team city include agent status into team city server log? For example, if an agent is disconnected or unauthorized, we can find this warning or error in team city server log.


Hi Shawn,

AFAIK there are no related changes in the logging.

However, for the task you describe (stream build finish details or agent status changes to external system), it seems that a custom plugin is a suitable and appropriate option. There are third-party plugins like WebHooks (and an alternative) and it is quite easy to write a new plugin logging the build data in the format you need or sending events to an external system.


Please sign in to leave a comment.