配置 Teamcity 的日志记录行为 [英] Configuring Teamcity's logging behaviour
问题描述
我在 CI 环境中使用 Teamcity 5.这是一个很棒的工具,但我一直在为一件事而苦苦挣扎:\TeamCity\logs
文件夹中的 stdout_yyyyMMdd.log
文件增长到荒谬的大小.有没有办法关闭它?
I'm using Teamcity 5 for our CI environment. It's a great tool, but I've been struggling with one thing: the stdout_yyyyMMdd.log
file in the \TeamCity\logs
folder grows to ridiculous sizes. Is there a way to turn it off?
我目前看过的地方:
- Jetbrains:标准输出上没有任何内容;
- 谷歌搜索tomcat stdout 日志":前几个链接并没有真正解决问题.
编辑:
在 KIR 的建议下,我实际上查看了标准输出中的内容.这是一遍又一遍重复的相同异常消息:
At KIR's suggestion, I actually looked to see what's in stdout. It's the same exception message repeated over and over again:
[2010-12-01 08:57:21,268] WARN - jetbrains.buildServer.SERVER - java.io.FileNotFoundException: <...Path...>\.BuildServer\system\caches\search\_8p.prx (The system cannot find the file specified)
[2010-12-01 08:57:21,315] ERROR - erverSide.search.SearchService - SearchService.enqueueHistory
java.io.FileNotFoundException: <...Path...>\.BuildServer\system\caches\search\_8p.prx (The system cannot find the file specified)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.<init>(Unknown Source)
at org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexInput$Descriptor.<init>(SimpleFSDirectory.java:78)
at org.apache.lucene.store.SimpleFSDirectory$SimpleFSIndexInput.<init>(SimpleFSDirectory.java:108)
at org.apache.lucene.store.SimpleFSDirectory.openInput(SimpleFSDirectory.java:65)
at org.apache.lucene.index.SegmentReader$CoreReaders.<init>(SegmentReader.java:132)
at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:638)
at org.apache.lucene.index.SegmentReader.get(SegmentReader.java:599)
at org.apache.lucene.index.DirectoryReader.<init>(DirectoryReader.java:104)
at org.apache.lucene.index.ReadOnlyDirectoryReader.<init>(ReadOnlyDirectoryReader.java:27)
at org.apache.lucene.index.DirectoryReader$1.doBody(DirectoryReader.java:74)
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:704)
at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:69)
at org.apache.lucene.index.IndexReader.open(IndexReader.java:476)
at org.apache.lucene.index.IndexReader.open(IndexReader.java:314)
at jetbrains.buildServer.serverSide.search.SearchService.getIndexSearcher(SearchService.java:451)
at jetbrains.buildServer.serverSide.search.SearchService.enqueueHistory(SearchService.java:515)
at jetbrains.buildServer.serverSide.search.BackgroundIndexer.run(BackgroundIndexer.java:32)
at java.lang.Thread.run(Unknown Source)
知道这个文件是什么吗?
Any idea what this file is?
推荐答案
如果你在 unix 上运行 TC 你可以使用 logrotate: http://linuxcommand.org/man_pages/logrotate8.html(显然,这是一种解决方法,但应该有效.)
If you're running TC on unix you could use logrotate: http://linuxcommand.org/man_pages/logrotate8.html (Obviously, this is a workaround but it should be effective.)
这个家伙有一个 Windows 等价物,也可以做到这一点:http://www.datori.org/?p=7
This guy has a windows equivalent that may do the trick too: http://www.datori.org/?p=7
这篇关于配置 Teamcity 的日志记录行为的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!