Travis中的错误:作业超出了最大日志长度,已终止。

huangapple 未分类评论78阅读模式
英文:

Error in Travis: The job exceeded the maximum log length, and has been terminated

问题

以下是您要翻译的内容:

我正在运行端到端测试,并发现在使用 .travis.yml 文件时出现了以下问题:

您可以在下面看到我的 travis.yml 文件
https://github.com/JosephThachilGeorge/TDDTEST/blob/master/.travis.yml

对于目标:- mvn -f spring-project/pom.xml verify -Pe2e

在 Travis 构建中,我遇到了错误:

> Travis:作业超出了最大日志长度

然而,以下目标运行得非常完美:

  • mvn -f spring-project/pom.xml clean verify -Pjacoco coveralls:report
  • mvn -f spring-project/pom.xml clean org.jacoco:jacoco-maven-plugin:prepare-agent install org.jacoco:jacoco-maven-plugin:report
  • mvn -f spring-project/pom.xml sonar:sonar -Dsonar.projectKey=JosephThachilGeorge_TDDTEST
  • mvn -f spring-project/pom.xml verify -Pfailsafe

我的 GitHub 链接是:https://github.com/JosephThachilGeorge/TDDTEST

在 Travis 中,我遇到了以下巨大的构建日志,最后显示:

> Travis:作业超出了最大日志长度

Travis中的错误:作业超出了最大日志长度,已终止。

英文:

I am running end to end test and found using .travis.yml

Below you can see my travis.yml
https://github.com/JosephThachilGeorge/TDDTEST/blob/master/.travis.yml

For goal : - mvn -f spring-project/pom.xml verify -Pe2e

I am getting error in Travis build:

> Travis: The job exceeded the maximum log length

However below goals are working perfectly:

  • mvn -f spring-project/pom.xml clean verify -Pjacoco coveralls:report
  • mvn -f spring-project/pom.xml clean org.jacoco:jacoco-maven-plugin:prepare-agent install org.jacoco:jacoco-maven-plugin:report
  • mvn -f spring-project/pom.xml sonar:sonar -Dsonar.projectKey=JosephThachilGeorge_TDDTEST
  • mvn -f spring-project/pom.xml verify -Pfailsafe

My github link is : https://github.com/JosephThachilGeorge/TDDTEST

In Travis I am getting below huge build
and finally it says

> Travis: The job exceeded the maximum log length

Travis中的错误:作业超出了最大日志长度,已终止。

答案1

得分: 0

以下步骤帮助我找到了解决方案:

建议创建一个 src/test/resources/logback.xml(如果使用的是 log4j.properties 作为日志后端,但从构建日志中看来,这似乎不太可能),并降低其中必要部分的日志记录级别。

查看 logback.xml 参考,下面的 logback.xml 会将全局日志记录级别降低为 INFO:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <include resource="org/springframework/boot/logging/logback/base.xml" />
    <root level="info"/>
</configuration>

通过这个改变,如你在我的构建中所见(见此更改 1),现在日志不再杂乱无章。

英文:

Following steps helped me to find solution :

suggests to create an src/test/resources/logback.xml (or log4j.properties if that’s the logging backend used but from the build log, that doesn’t seem likely) and lower the logging level for the necessary parts in it.

Looking at the logback.xml reference, the following logback.xml would lower the global logging level to INFO:

&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;configuration&gt;
    &lt;include resource=&quot;org/springframework/boot/logging/logback/base.xml&quot; /&gt;
    &lt;root level=&quot;info&quot;/&gt;
&lt;/configuration&gt;

As you can see in my build with this change 1, the log is now not being cluttered.

huangapple
  • 本文由 发表于 2020年8月14日 21:41:52
  • 转载请务必保留本文链接:https://java.coder-hub.com/63413934.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定