TeamCity
 
You are viewing the documentation for an earlier version of TeamCity.

Logs of Internal Events

Last modified: 20 April 2023

TeamCity uses http://logging.apache.org/log4j for internal logging of events. The following logging rules are used:

Build agent logs



Build agent Log4J configuration file is buildAgent/conf/teamcity-agent-log4j.xml. Build agent logs are placed to buildAgent/logs directory. General build agent log is named teamcity-agent.log When build agent is installed using Java Service Wrapper (as windows service), it logs its output and error output to buildAgent/logs/wrapper.log.

To configure location of the logs, you have to alter value of teamcity_logs property (passed to JVM via -D option). To change Log4J configuration file location, you have to change value of log4j.configuration property.

Such changes should be made in:

  • buildAgent/launcher/conf/wrapper.conf file if build agent is installed as service

  • buildAgent/bin/agent.(sh|bat) if agent is run from the command line

TeamCity server logs



TeamCity server Log4J configuration file is TeamCity/conf/teamcity-server-log4j.xml. TeamCity server logs are placed to TeamCity/logs directory and prefixed with teamcity- prefix. General TeamCity server log is named teamcity-server.log, there are also teamcity-activities.log and teamcity-vcs.log.

To configure location of the logs, you have to alter value of teamcity_logs property (passed to JVM via -D option). To change Log4J configuration file location, you have to change value of log4j.configuration property.

Such changes should be made:

  • in files TeamCity/bin/runAll.(sh|bat) if server is run from the command line (or in catalina.bat/sh)

  • Using tomcat5w.exe if TeamCity is installed as Windows service

  • If war-distribution of TeamCity used, by default you should be able to find teamcity.log in <J2EEContainer>/logs directory. You may add log4j.configuration property to specify Log4J configuration for TeamCity

Example of server log configuration properties:

-Dlog4j.configuration=file:../conf/teamcity-server-log4j.xml -Dteamcity_logs=../logs/