JetBrains / teamcity-investigations-auto-assigner

Assigns investigations of build failures automatically based on heuristics
Apache License 2.0
9 stars 14 forks source link

How to append plugin logs to a separate file #17

Closed medboz closed 6 years ago

medboz commented 6 years ago

I added the following lines to servers\TeamCity-2017.2\conf\teamcity-server-log4j.xml but it dind't work(logs are not written to logs\teamcity-investigations-auto-assigner.log as expeted) :

<appender name="INVESTIGATION_AUTO_ASSIGNER.LOG" class="jetbrains.buildServer.util.TCRollingFileAppender">
    <param name="file" value="${teamcity_logs}teamcity-investigations-auto-assigner.log"/>
    <param name="maxBackupIndex" value="3"/>

    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="[%d] %6p [%30.15t] - %30.30c - %m %n"/>
    </layout>
  </appender>

  <category name="jetbrains.buildServer.iaa" additivity="false">
    <priority value="INFO"/>
    <appender-ref ref="INVESTIGATION_AUTO_ASSIGNER.LOG"/>
  </category>

I tried with different values of name attribute in < category name="XXX" (jetbrains.buildServer.iaa, jetbrains.buildServer.iaa.processing,), but still doesn't work. Can you please advice if you have any idea how to make this work.

FYI: we have an old version of the plugin in our teamcity server and it is configured with the appender above and it works well.

medboz commented 6 years ago

The issue in the priority configured in log4j. Debug logs are append to teamcity-investigations-auto-assigner.log when setting : <priority value="DEBUG"/>