Cia*_*her 7 java coldfusion windows-services jrun
我在Windows机器上运行ColdFusion 8应用程序服务器.ColdFusion作为Windows服务运行.
我注意到System.out某些机器上的文件很大(1GB +).
例如
C:\ ColdFusion8 \运行\ BIN \的System.out
我知道这是运行CF作为服务时控制台输出结束的地方,但是有没有任何JRun设置允许我每隔x MB保存一次该文件,或者限制文件的大小或类似的东西?
所有提示赞赏!
重要编辑:
根据这里的讨论- 我认为重要的是要提到System.out由于大量代码写入该文件,文件在我们的机器上变得很大,即使用:
sys = createObject("java", "java.lang.System");
sys.out.println(...);
Run Code Online (Sandbox Code Playgroud)
如果您将CF作为控制台作业运行(即从命令行),这是一个有用的调试工具,因为旧版本的CF在使用时没有登录到控制台<cflog />.
我们已经要求我们的开发人员停止这种做法,而是使用<cflog />或writeLog()两者都登录到控制台以及应用程序日志(默认情况下).
看起来如果您转到ColdFusion服务器文件的jrun.xml并找到该行:
<service class="jrunx.logger.ConsoleLogEventHandler" name=":service=ConsoleLogEventHandler" />
Run Code Online (Sandbox Code Playgroud)
您应该能够将这些位添加到它:
<attribute name="rotationSize">200k</attribute>
<attribute name="rotationFiles">3</attribute>
<!-- Use heading to specify an alternate log heading for system event log. -->
<!-- EXAMPLE: <attribute name="heading"># Created by JRun on {date MM/dd HH:mm:ss}</attribute> -->
<attribute name="closeDelay">5000</attribute>
<attribute name="deleteOnExit">false</attribute>
Run Code Online (Sandbox Code Playgroud)
然后根据需要操作设置.但是根据此博客条目,您无法更改文件的名称.
| 归档时间: |
|
| 查看次数: |
1003 次 |
| 最近记录: |