Skip to content

Instantly share code, notes, and snippets.

@DTTerastar
Created June 18, 2018 20:20
Show Gist options
  • Save DTTerastar/0fb76b8056b8adf9b3cc7921c49f747f to your computer and use it in GitHub Desktop.
Save DTTerastar/0fb76b8056b8adf9b3cc7921c49f747f to your computer and use it in GitHub Desktop.
<?xml version='1.0' encoding='ISO-8859-1' ?>
<!DOCTYPE log4j:configuration SYSTEM "./log4j.dtd">
<!--
To enable debug logging remove XML comments in the lines below that are marked with "DELETE THIS LINE FOR ENABLING DEBUG LOGGING" text.
The file can be modified without application restart, but some changes can still require restart to take effect.
You might also need to increase the number of files to store to prevent logs from quick rotation
<param name="maxBackupIndex" value="20"/>
-->
<log4j:configuration>
<appender name="CONSOLE-WARN" class="org.apache.log4j.ConsoleAppender">
<param name="target" value="System.err"/>
<layout class="jetbrains.buildServer.log.MessagesFilterLayout">
<param name="ConversionPattern" value="[%d] %6p - %30.30c - %m %n"/>
</layout>
<filter class="org.apache.log4j.varia.LevelRangeFilter">
<param name="LevelMin" value="WARN"/>
</filter>
</appender>
<appender name="ROLL" class="jetbrains.buildServer.util.TCRollingFileAppender">
<param name="file" value="${teamcity_logs}teamcity-agent.log"/>
<param name="maxBackupIndex" value="3"/>
<!--REPLACE PREVIOUS LINE WITH UNCOMMENTED LINE TO STORE MORE LOGS-->
<!-- <param name="maxBackupIndex" value="20"/> -->
<layout class="jetbrains.buildServer.log.MessagesFilterLayout">
<param name="ConversionPattern" value="[%d] %6p - %30.30c - %m %n"/>
</layout>
<filter class="jetbrains.buildServer.log.CategoryFilter">
<param name="DenyCategory" value="jetbrains.buildServer.VCS"/>
</filter>
<filter class="jetbrains.buildServer.log.CategoryFilter">
<param name="DenyCategory" value="javasvn.output"/>
</filter>
<filter class="jetbrains.buildServer.log.CategoryFilter">
<param name="DenyCategory" value="jetbrains.buildServer.plugins.spring.SpringPluginLoader$TeamCityFileSystemXmlApplicationContext"/>
<param name="MaxDenyLevel" value="INFO"/>
</filter>
</appender>
<appender name="SVN.LOG" class="jetbrains.buildServer.util.TCRollingFileAppender">
<param name="file" value="${teamcity_logs}teamcity-svn.log"/>
<layout class="jetbrains.buildServer.log.MessagesFilterLayout">
<param name="ConversionPattern" value="[%d] %6p - %30.30c - %m %n"/>
</layout>
</appender>
<appender name="ROLL.VCS" class="jetbrains.buildServer.util.TCRollingFileAppender">
<param name="file" value="${teamcity_logs}teamcity-vcs.log"/>
<param name="maxBackupIndex" value="2"/>
<!--REPLACE PREVIOUS LINE WITH UNCOMMENTED LINE TO STORE MORE LOGS-->
<!-- <param name="maxBackupIndex" value="20"/> -->
<layout class="jetbrains.buildServer.log.MessagesFilterLayout">
<param name="ConversionPattern" value="[%d] %6p - %30.30c - %m %n"/>
</layout>
<filter class="org.apache.log4j.varia.LevelRangeFilter">
<param name="LevelMin" value="DEBUG"/>
</filter>
</appender>
<appender name="ROLL.XMLRPC" class="jetbrains.buildServer.util.TCRollingFileAppender">
<param name="file" value="${teamcity_logs}teamcity-xmlrpc.log"/>
<param name="maxBackupIndex" value="3"/>
<!--REPLACE PREVIOUS LINE WITH UNCOMMENTED LINE TO STORE MORE LOGS-->
<!-- <param name="maxBackupIndex" value="20"/> -->
<layout class="jetbrains.buildServer.log.MessagesFilterLayout">
<param name="ConversionPattern" value="[%d] %6p - %30.30c - %m %n"/>
</layout>
</appender>
<appender name="ROLL.BUILD" class="jetbrains.buildServer.util.TCRollingFileAppender">
<param name="file" value="${teamcity_logs}teamcity-build.log"/>
<param name="maxBackupIndex" value="1"/>
<!--REPLACE PREVIOUS LINE WITH UNCOMMENTED LINE TO STORE MORE LOGS-->
<!-- <param name="maxBackupIndex" value="20"/> -->
<layout class="jetbrains.buildServer.log.MessagesFilterLayout">
<param name="ConversionPattern" value="[%d] %c{1} - %m%n"/>
</layout>
</appender>
<!--================================================================-->
<category name="jetbrains.buildServer.VCS">
<priority value="INFO"/>
<appender-ref ref="ROLL.VCS"/>
</category>
<category name="jetbrains.buildServer">
<priority value="DEBUG"/>
<appender-ref ref="ROLL"/>
</category>
<category name="teamcity.out">
<appender-ref ref="ROLL.BUILD"/>
</category>
<category name="teamcity.err">
<appender-ref ref="ROLL.BUILD"/>
</category>
<category name="jetbrains.buildServer.XMLRPC">
<!--<priority value="DEBUG"/>-->
<appender-ref ref="ROLL.XMLRPC"/>
</category>
<category name="javasvn.output">
<!--<priority value="DEBUG"/>-->
<appender-ref ref="SVN.LOG"/>
</category>
<root>
<priority value="INFO"/>
<appender-ref ref="CONSOLE-WARN"/>
</root>
</log4j:configuration>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment