Versions Compared

Key

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


Panel
borderColor#C3CCD7
bgColor#FCFCFC

Table of Contents

Table of Contents
indent16px


서버 사이드의 로깅 설정은 $SONARQUBE_HOME/conf/sonar.properties 파일의 속성값으로 설정합니다.

1개의 SonarQube 프로세스 당 4개의 로그 파일을 생성합니다.

로그 레벨

서버 사이드 로그 레벨은 sonar.log.level 속성값으로 설정할 수 있습니다. 다음 속성값을 사용할 수 있습니다:

  • INFO (기본)
  • DEBUG - 상세 로그
  • TRACE - 상세 로그 및 모든 SQL / Elasticsearch 요청을 표시합니다. TRACE 레벨의 로깅은 서버의 속도를 저하시킬 수 있으므로, 웹 요청 성능에 문제가 있는 경우에만 사용할 것을 권장합니다.

프로세스 로그 레벨

SonarQube 서버의 4개 프로세스에 대한 로그 레벨은 다음 속성값으로 설정할 수 있습니다:

  • sonar.log.level.app: SonarQube의 메인 프로세스 (즉, WrapperSimpleApp입니다 이 앱은 다른 3개의 프로세스를 시작시킵니다)
  • sonar.log.level.web: WebServer  프로세스
  • sonar.log.level.ce: ComputeEnginerServer 프로세스
  • sonar.log.level.es: SearchServer 프로세스

로그 순환Log Rotation

로그 순환은  sonar.log.rollingPolicy 속성값으로 설정할 수 있습니다.

  • time:[value] - 시간 기반으로 순환합니다. 예를 들어, time:yyyy-MM-dd는 일 단위 순환 time:yyyy-MM은 월 단위 순환을 의미합니다.
  • size:[value] - 용량 기반으로 순환합니다. 예를 들어, size:10MB와 같이 설정할 수 있습니다.
  • none - 로그를 순환하지 않습니다. 외부 시스테에 의해 로그를 관리하는 경우 주로 사용합니다.

sonar.log.maxFiles은 보존할 파일의 최대 수를 의미합니다. sonar.log.rollingPolicy=none으로 설정한 경우 이 속성은 무시됩니다.

기타 로그

In addition to the log files created in $SONARQUBE_HOME/logs, background task logs are created in the  폴더에는 로그 파일이 생성되며, $SONARQUBE_HOME/data/ce/logs directory. One subdirectory will be created for each 디렉토리에는 백그라운드 태스트 로그가 생성됩니다. 인스턴스의 project, developer , and view in the instance. These subdirectories will be organized by type (for instance 및 view 별로 별도의 하위 디렉토리가 생서욉니다. 이 하위 디렉토리는 type 별로 조직되어 있습니다(예: data/ce/logs/PROJECT/... ). Each directory will contain up to 10 log files (this is configurable in 각 디렉토리는 최대 10개의 로그 파일(최대 파일 개수는 Administration > General > GeneralGeneral에서 설정 가능), and with default logging settings the log files are typically no larger than 10kb. Other logs may be created as well을 저장하며, 로그 파일의 기본 최대 용량은 10kb입니다. 다른 로그 파일들 역시 동일한 기준에 따라 생성됩니다.