2011년 12월 30일 금요일

SCM - 소스코드 엑세스 로그

https://jazz.net/wiki/bin/view/Main/SCMScaa


In your RTC deployment, you may wish to log access to the File content in your repository, for traceability rationale. While this support is disabled by default, it can be enabled through the use of log4j.

To enable logging, uncomment the following section from the bottom of of jazz/server/conf/jazz/log4j.properties


#log4j.appender.scm_scaa=org.apache.log4j.RollingFileAppender #log4j.appender.scm_scaa.layout=org.apache.log4j.PatternLayout #log4j.appender.scm_scaa.layout.ConversionPattern=%m %n #log4j.appender.scm_scaa.File=scaa_content.log #log4j.appender.scm_scaa.MaxBackupIndex=10 #log4j.appender.scm_scaa.MaxFileSize=7000KB 
#log4j.logger.scm_scaa=TRACE, scm_scaa


This will create a scaa_content.log file in jazz/server/logs. The log will be rotated between 10 files of 7MB each.
Logging will occur as users access content from the server. Nothing will be written to the logs if there is no user activity.
To process this data for use in another tool, you should convert this configuration FileAppender and pipe the file into the script or program.

The format of the log entries are as follows:


SCAA:{0}/{1},{2},{3},{4}/{5},{6}


where :
  • {0} is the contributor's userid
  • {1} is the item type (in RTC 2.0, most commonly FileItem?)
  • {2} is the last segment of the item's path (Foo.java)
  • {3} is the item's identifier
  • {4} is the item's state or version identifier
  • {5} is the component's name or label
  • {6} is the component's identifier
While there is not a huge overhead to logging content access, the logfiles can grow fairly large quickly. In the default configuration, it may take less than a day for the 10 logfiles to completely rollover, depending on the number of developers and build engines your server hosts.

댓글 없음:

댓글 쓰기