Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. confluence/WEB-INF/classes/log4j.properties의 아래 부분을

    Code Block
    languagebash
    titleconfluence/WEB-INF/classes/log4j.properties
    # log4j.category.com.atlassian.confluence.util.AccessLogFilter=INFO

     다음과  같이 수정

    Code Block
    log4j.category.com.atlassian.confluence.util.AccessLogFilter=INFO, accesslog
    log4j.additivity.com.atlassian.confluence.util.AccessLogFilter=false
  2. confluence/WEB-INF/classes/log4j.properties의 맨 아래에 다음 내용 추가

    Code Block
    ## access log
    log4j.appender.accesslog=org.apache.log4j.RollingFileAppender
    log4j.appender.accesslog.Threshold=DEBUG
    log4j.appender.accesslog.File=${catalina.home}/logs/atlassian-confluence-access.log
    log4j.appender.accesslog.MaxFileSize=20480KB
    log4j.appender.accesslog.MaxBackupIndex=5
    log4j.appender.accesslog.layout=com.atlassian.confluence.util.PatternLayoutWithStackTrace
    log4j.appender.accesslog.layout.ConversionPattern=%d %p [%t] [%c{4}] %M %m%n
  3. confluence/WEB-INF/web.xml  의 filter 설정

    Code Block
    languagexml
    <filter-mapping>
        <filter-name>AccessLogFilter</filter-name>
        <url-pattern>/display/*</url-pattern>
        <url-pattern>*.action</url-pattern>
    </filter-mapping>

    또는 모든 access 를 남기는 다음 filter 를 사용해도 됨(로그가 많이 남으니 주의)

    Code Block
    languagexml
    <filter-mapping>
       <filter-name>AccessLogFilter</filter-name>
       <url-pattern>/*</url-pattern>
    </filter-mapping>
  4. confluence 재시작

 

Info

confluence/logs/atlassian-confluence-access.log 에 접근 로그가 기록된다.

...