I'll be back!

  Focus on BPM, celebrate PegaRULES Process Commander (PRPC)
posts - 76, comments - 161, trackbacks - 0, articles - 2
  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理
  • Edit the “prlogging.xml”, in the “$AppServer\prweb\WEB-INF\classes”
  • If you want to change the log file directory, the following should be changed:
<param name="FileNamePattern" value="'C:\\PegaTemp\\V51Log\\PegaRULES-'yyyy-MMM-dd'.log'"/>

 

  • Edit the prlogging.xml file, uncomment:
<category name="Rule_Obj_Activity">
        
<priority value="INFO"/>
</category>

 

  • When develop activity, add one debug log step where you need it.

Step, Java, Code:

oLog.info();
oLog.debug();

 

  • The log info is printed on the console and also written to the “PegaRULES-'yyyy-MMM-dd'.log” log file.
  • You could get this file throgh:

Tools-->Log files--> Text.

RollingFileAppender extends FileAppender to backup the log files when they reach a certain size.

    <appender name="DFILE" class="org.apache.log4j.RollingFileAppender">
        
<param name="File" value="D:/prpctmp/log/PegaRULES-'yyyy-MMM-dd'.log"/>
        
<param name="maxBackupIndex" value="10" />
        
<param name="maxFileSize" value="5KB" />
        
<layout class="com.pega.apache.log4j.PatternLayout">
            
<param name="ConversionPattern" value="%d{ABSOLUTE} [%20.20t] (%30.30c{3}) %-5p %X{stack} - %m%n"/>
        
</layout>
    
</appender>

 

DailyRollingFileAppender extends FileAppender so that the underlying file is rolled over at a user chosen frequency.

    <appender name="DFILE" class="com.pega.apachelog4j.DailyRollingFileAppender">
        
<param name="DatePattern" value="'.'yyyy-MM-dd-HH-mm"/>
        
<param name="File" value="D:\\prpctmp\\log\\PegaRULES.log"/>
        
<layout class="com.pega.apache.log4j.PatternLayout">
            
<param name="ConversionPattern" value="%d{ABSOLUTE} [%20.20t] (%30.30c{3}) %-5p %X{stack} - %m%n"/>
        
</layout>
    
</appender>

Refer to http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/FileAppender.html


只有注册用户登录后才能发表评论。


网站导航: