Teamcity build log

别说谁变了你拦得住时间么 提交于 2019-11-30 03:58:27
Pavel Repin
  1. change encoding for log4j configuration for build log in conf/teamcity-agent-log4j.xml

    <appender name="ROLL.BUILD" class="jetbrains.buildServer.util.TCRollingFileAppender">
      <param name="file" value="${teamcity_logs}teamcity-build.log"/>
      <param name="Encoding" value="UTF-8"/>
      ...
    </appender>
    
  2. add file.encoding=UTF-8 parameter launcher/conf/wrapper.conf that uses agent on start you should add it like that

    wrapper.app.parameter.6=-Dfile.encoding=UTF-8
    
  3. add -Dfile.encoding=UTF-8 in JAVA_OPTS

that steps helps me but now i have a bug - if you watching tail new Russian symbols in log replaced by "?". after refreshing the page they shown correct.

For me, on Windows 7, TeamCity 9.0.3 helped adding "teamcity.runner.commandline.stdstreams.encoding=866" line into the buildAgent.properties file. I've got the encoding value by typing "chcp" in the command prompt.

For Teamcity 9 the next had helped:

sudo dpkg-reconfigure locales
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8

(do this being on your agents)

After that - restart the agent:

./BuildAgent/bin/agent.sh stop

For me, on TeamCity 7 and TeamCity 8, helped editing file teamcity-agent-log4j.xml:

<?xml version='1.0' encoding='UTF-8' ?>

and restarting TeamCity after that.

But encoding is correct only after refreshing the log page.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!