有没有更好的方法来查看团队构建日志?
目前,团队构建的 msbuild 日志令人震惊,因为它们只是纯文本,非常难以阅读。 另外,我的构建创建的文件大小约为 30Mb,需要相当长的时间才能下载(我们的 TFS 服务器位于我们的数据中心)。
有谁知道有什么方法可以更轻松地查看这些日志,最好与 TFS 本身或 TFS WebAccess 集成?
Currently the msbuild logs for team build are appalling as they are just plain text and are very difficult to read. Also the ones created by my build are approx 30Mb and take quite a while to download (our TFS server is in our datacentre).
Does anyone know any way of being able to view these logs easier, prefereably integrated with either TFS itself or TFS WebAccess?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看看我不久前写的以下博客文章:
http://www.woodwardweb。 com/teamrise/000415.html
这描述了如何创建一个简单的 ASP.NET 页面,该页面将通过 HTTP 将日志文件的内容流式传输给您。 这样做的优点是,在 Visual Studio 中开始为您呈现日志之前,您不必等待整个页面加载。
另外 - 您可以在流式传输时向文件添加一些简单的格式。 在我博客上的示例中,我只是将每个目标的开头显示为粗体,以使它们更加突出,但是如果您愿意,您可以看到如何使用这种方法来疯狂。
Take a look at the following blog post I did a while ago:
http://www.woodwardweb.com/teamprise/000415.html
This describes how to create a simple ASP.NET page that will stream the contents of your log file to you over HTTP. The advantage of doing it this way is that you don't have to wait for the entire page to load before the log starts to render for you in Visual Studio.
Also - you can add some simple formatting to the file while streaming. In the example on my blog I simply make the start of each target appear in bold to make them stand out a bit more, but you can see how you could go crazy with this approach if you wanted.
如果增加带宽不是一个选择,那么我建议您编写自己的 html 记录器并将其附加到构建过程中。 将 html 构建日志拆分为小部分(由目标和/或项目定义),并让一个索引文件指向所有小部分,并提供适当的信息(无论给定部分失败还是成功)。 然后您只需要解析索引文件和链接上任何请求的部分。
第三种可能性是在构建完成后压缩日志文件。
If increasing bandwidth isn't an option then I would suggest you to write your own html logger and attach it to the build process. Splitting the html build log into minor parts (definded by targets and/or projects) and having one index file pointing to all the minor parts with appropiate information whether a given part failed or succeeded. Then you only need to parse the index file and any requested part over the link.
A third possibility is to compress the log-file after the build completes.