Ecology8配置文件:Resin日志按日期拆分

来源:互联网 发布:unity3d 素材制作 编辑:程序博客网 时间:2024/05/29 08:34

默认情况下Resin日志在:WEAVER/Resin/log目录下的jvm-default.log文件中。

当Resin运行时间比较长,如果不及时删除该日志文件,日积月累后该文件会大至N个G,给需要看日志的用户带来及大的不便!!

如何解决这个问题?

答案是:拆分该日志文件!

拆分方式如下,修改 Resin/conf/resin.conf 文件,启用三个标签:“access-log、stdout-log、stderr-log”,参考配置如下:

<?xml version="1.0" encoding="utf-8"?><resin xmlns="http://caucho.com/ns/resin" xmlns:resin="http://caucho.com/ns/resin/core"><cluster id="app-tier"><host-default><!-- 访问日志 --><access-log path="logs/access.log"archive-format="access-%Y%m%d.log"format='%{loginidweaver}c` %D` %h` %n` %u` "%t"` "%r"`  "%{Referer}i"'rollover-period="1D"><exclude>\.gif$</exclude><exclude>\.jpg$</exclude><exclude>\.png$</exclude><exclude>\.js$</exclude><exclude>\.css$</exclude><exclude>\.html$</exclude><exclude>\.htm$</exclude><exclude>\.swf$</exclude><exclude>\.cur$</exclude></access-log><!-- 输出日志 --><stdout-log path="logs/stdout.log"archive-format="stdout-%Y%m%d.log"timestamp="[%Y.%m.%d %H:%M:%S.%s]"rollover-period="1D"/><!-- 错误日志 --><stderr-log path="logs/stderr.log"archive-format="stderr-%Y%m%d.log"timestamp="[%Y.%m.%d %H:%M:%S.%s]"rollover-period="1D"/></host-default></cluster></resin>

阅读全文
0 0
原创粉丝点击