Travis 中的错误:作业超出了最大日志长度,已被终止 [英] Error in Travis: The job exceeded the maximum log length, and has been terminated

查看:49
本文介绍了Travis 中的错误:作业超出了最大日志长度,已被终止的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行端到端测试并发现使用 .travis.yml

下面你可以看到我的 travis.yml

解决方案

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

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

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

<配置><include resource="org/springframework/boot/logging/logback/base.xml";/><根级别=信息"/></配置>

正如您在此更改 1 的构建中看到的那样,日志现在不再杂乱.

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

解决方案

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:

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

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

这篇关于Travis 中的错误:作业超出了最大日志长度,已被终止的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆