CB Spider 서버 로그출력 환경 설정 방법 (Korean) - cloud-barista/cb-spider GitHub Wiki

CB-Spider 서버 로그출력 환경 설정 방법


CB-Spider 로그출력은 cb-log (Cloud-Barista 공통 로그 관리 라이브러리) 를 활용하고 있으며, 세부 설정 방법은 다음과 같다.

1. 설정 파일: $CBLOG_ROOT/conf/log_conf.yaml

2. 적용 방법: 서버 재가동 또는 자동 반영(loopcheck=true 설정시)

3. 설정 정보:

Configurations Descriptions Default
loopcheck 설정값 변경시 자동 반영 여부 설정. 설정값: true, false false
loglevel 로그 레벨 설정. 설정값: trace, debug, info, warn, error, fatal, panic error
logfile 로그 파일 출력 여부 설정. 설정값: true, false true
logfileinfo: ----- 이하 logfile true 일때 유효 -----
filename 로그를 저장할 파일 path 및 이름. 설정값: {path}logfilename ./log/cblogs.log
maxsize 개별 로그 파일 크기. 설정값: integer #megabytes 10
maxbackups 로그 파일 개수. 설정값: integer #number 50
maxage 로그 파일 유지 기간. 설정값: integer #days 31

4. 설정 예시

$ vi $CBLOG_ROOT/conf/log_conf.yaml

#### Config for CB-Log Lib. ####

cblog:
  ## true | false
  loopcheck: false # This temp method for development is busy wait. cf) cblogger.go:levelSetupLoop().

  ## trace | debug | info | warn/warning | error | fatal | panic
  loglevel: error # If loopcheck is true, You can set this online.

  ## true | false
  logfile: true

## Config for File Output ##
logfileinfo:
  filename: ./log/cblogs.log
  maxsize: 10 # megabytes
  maxbackups: 50
  maxage: 31 # days