Logs of Internal Events
Last modified: 20 April 2023TeamCity 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 <agent home>/conf/teamcity-agent-log4j.xml
Build agent logs are placed to <agent home>/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 <agent home directory>/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:
<agent home directory>/launcher/conf/wrapper.conf
file if build agent is installed as service<agent home directory>/bin/agent.(sh|bat)
if the agent is run from the command line
TeamCity server logs
TeamCity server Log4J configuration file is <TeamCity home>/conf/teamcity-server-log4j.xml
TeamCity server logs are placed to <TeamCity home>/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 home>/bin/runAll.(bat|sh)
if server is run from the command line (or incatalina.(bat|sh
)Using
tomcat6w.exe
, if TeamCity is installed as Windows serviceIf you used the WAR-distribution to install TeamCity, by default you should be able to find
teamcity.log
file in the<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/
Thanks for your feedback!