Resin 3 LOG 设置

[ 2007-08-29 18:45:19 | Author: zhenhua ]
Font Size: Large | Medium | Small
<stdout-log path='${resin.home}/log/stdout.log'
archive-format="stdout-%Y_%m_%d.log"
rollover-period='1D'
rollover-size='1mb'/>

<stderr-log path='${resin.home}/log/stderr.log'
archive-format="stderr-%Y_%m_%d.log"
rollover-period='1D'
rollover-size='1mb'/>

log设置
<log name='' level='info' path='stdout:' rollover-period='1W' timestamp='[%Y/%m/%d %H:%M:%S.%s] '/>
<log name='com.caucho.java' level='fine' path='stdout:' rollover-period='1W' timestamp='[%Y/%m/%d %H:%M:%S.%s] '/>
<log name='com.caucho.loader' level='config' path='stdout:' rollover-period='1W' timestamp='[%Y/%m/%d %H:%M:%S.%s] '/>

name 是指定对各个层次应用进行debug,name 设定有几种情况,如:
Name=’’ name为空,这对所有应用、包括端口全面进行调试记载日志
Name=’com.caucho.jsp’ 指定只对jsp进行调试记载日志
Name=’com.caucho.java’ 指定只对java类进行调试
Name=’com.caucho.server.port’ 指定只对端口、线程进行调试
Name=’com.caucho.server.port.AcceptPool 指定只对端口线程的创建和释放进行debug
….

level 的级别一般有::
Off Severe info config fine finer finest all 这几中配置级别;
Off 关闭日志输出
Severe 只输出些严重的出错信息
Info 输出一般的综合信息
Config 输出配置信息
Fine 输出resin的跟踪信息
Finer 输出详细的跟踪信息
Finest 输出比Finer更详细的跟踪消息、细节问题
All 输出所有的访问输出消息

path: 输出文件路径指向,可以形式如 path=’stdout:’ 注意后面有冒号;或指定绝对路径path=’/usr/local/resin-3.0.7/log/stdout.log’
Timestamp : 完整的输出日期格式[%Y/%m/%d %H:%M:%S.%s];

一般设置日志文件一周轮循一次,即 rollover-period=’1M’ 或 rollover-period=’7D’ , 当满一周,系统会自动生成新日志记录文件,格式如: stderr.log.20041201 stderr.log.20041208
rollover-period=’D’ 天
rollover-period=’h’ 小时
rollover-period=’W’ 周
rollover-period=’M’ 月

详细:http://www.caucho.com/resin-3.1/doc/config-log.xtp
Comments Feed Comments Feed: http://www.zhenhua.org/feed.asp?q=comment&id=482
UTF-8 Encoding Trackback URL: http://www.zhenhua.org/trackback.asp?id=482

There is no comment on this article.

If you feel this site you find this information helpful, please click on the donation, which is voluntary,Thank you.
Post Comment
Smilies
[arrow] [biggrin] [confused] [cool]
[cry] [eek] [evil] [exclaim]
[frown] [idea] [lol] [mad]
[mrgreen] [neutral] [question] [razz]
[redface] [rolleyes] [sad] [smile]
[surprised] [twisted] [wink]
Enable UBB Codes
Auto Convert URL
Show Smilies
Hidden Comment
Username:   Password:   Register Now?
Security Code * Please Enter the Security Code