JRun/Coldfusion - System.out - 如何防止它变得太大?
我在 Windows 计算机上运行 ColdFusion 8 应用程序服务器。 ColdFusion 作为 Windows 服务运行。
我注意到在某些机器上 System.out
文件很大(1GB+)。
例如
C:\ColdFusion8\runtime\bin\System.out
我知道这是将 CF 作为服务运行时控制台输出结束的地方,但是是否有任何 JRun 设置允许我每 x MB 保存此文件,或者限制文件的大小或类似的东西?
感谢所有提示!
重要编辑:
基于讨论此处 - 我认为有必要提及一下,由于向该文件写入了大量代码,System.out
文件在我们的计算机上变得很大,即使用:
sys = createObject("java", "java.lang.System");
sys.out.println(...);
如果您将 CF 作为控制台作业(即从命令行)运行,这是一个有用的调试工具,因为旧版本的 CF 在使用
我们已要求开发人员停止这种做法,转而使用
或 writeLog()
,它们都会记录到控制台以及应用程序日志(默认情况下)。
I am running ColdFusion 8 application servers on Windows machines. ColdFusion is running as a Windows service.
I have noticed that System.out
file is massive (1GB+) on some of the machines.
e.g.
C:\ColdFusion8\runtime\bin\System.out
I understand this is where console output ends up when running CF as a service, but is there any JRun setting to allow me to save this file off every x MB, or to limit the size of the file or something similar?
All tips appreciated!
IMPORTANT EDIT:
Based on a discussion here - I thought it important to mention that the System.out
file has gotten large on our machines due to lots of code writing to that file, i.e. using:
sys = createObject("java", "java.lang.System");
sys.out.println(...);
If you are running CF as a console job (i.e from the command line) this is a useful debugging tool, as older versions of CF did not not log to console when using <cflog />
.
We've asked our developers to discontinue this practice and instead use <cflog />
or writeLog()
both of which log to the console as well as the the application log (by default).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来如果您转到 ColdFusion 服务器文件的 jrun.xml 并找到以下行:
您应该能够向其中添加这些位:
然后根据需要操作设置。但是 根据此博客条目,您无法更改文件名。
It looks like if you go to the jrun.xml for your ColdFusion server file and find the line:
You should be able to add these bits to it:
And then manipulate the settings as you see fit. However according to this blog entry, you cannot change the name of the file.