This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

Portage log/ko

From Gentoo Wiki (test)
Jump to:navigation Jump to:search
This page is a translated version of the page Portage log and the translation is 100% complete.
Other languages:

When using emerge for building a package, it is not uncommon to notice messages coming from Portage itself. Since they may contain important information from Gentoo developers it is a good idea to read them, but often this is not immediately possible because they rapidly scroll out of the screen. This can be easily solved by enabling a Portage feature called elog, whose purpose is to save messages to disk for later review. But other logging capabilities exist as well...

포티지 elog 하위 시스템

포티지 elog 하위 시스템은 관리자 또는 사용자에게 주의를 끌도록 개발자가 ebuild에 넣어, 개별 ebuild에서 제공하는 로그 메시지 내용을 유지합니다. 종종 이 메시지는 언급한 꾸러미 빌드에 관련있는 중요한 관심있는 정보가 들어있습니다.

설정

PORTAGE_ELOG_CLASSES 변수에 어떤 종류의 정보를 기록할 지 선택하십시오. 가능한 값은 info, warn, error, log, qa 입니다:

PORTAGE_ELOG_CLASSES="log warn error"

파일 기반 저장소 설정

포티지는 여러가지 방법으로 elog 이벤트를 처리할 수 있습니다.

elog 이벤트 기록을 디스크에 저장하려면 PORTAGE_ELOG_SYSTEM 변수에 save 모듈을 넣어 활성화하십시오:

파일 /etc/portage/make.conf
PORTAGE_ELOG_SYSTEM="save"

메시지는 /var/log/portage/elog에 저장하든지 언급한 변수를 설정했다면 ${PORT_LOGDIR}/elog에 저장합니다.

카테고리별 elog 파일을 만들려면 split-elog 포티지 기능을 활성화하십시오. 포티지가 /var/log/portage/elog 위치에 카테고리 기반 디렉터리를 만들도록 강제 설정합니다.

전자메일 설정

수신자에게 로그를 메일로 보내려면 mail 모듈을 활성화하십시오. 메일 옵션은 몇가지 추가 변수를 설정해야합니다. 자세한 내용은 /usr/share/portage/config/make.conf.example 파일을 살펴보십시오.

아래, 자체적으로 설명한 예제 설정이 있습니다:

파일 /etc/portage/make.conf
PORTAGE_ELOG_SYSTEM="mail"
# First the mail-to address, then the SMTP server
PORTAGE_ELOG_MAILURI="log-intake@example.com mail.example.com"
PORTAGE_ELOG_MAILFROM="portage@$(hostname).example.com"
PORTAGE_ELOG_MAILSUBJECT="${PACKAGE} is ${ACTION} on ${HOST}"

nullmailer 또는 sendmail용 다른 예제도 있습니다:

파일 /etc/portage/make.conf
PORTAGE_ELOG_SYSTEM="mail"
# First the mail-to address, then the SMTP server
PORTAGE_ELOG_MAILURI="users@host /usr/sbin/sendmail"
PORTAGE_ELOG_MAILFROM="portage@$(hostname).example.com"
PORTAGE_ELOG_MAILSUBJECT="${PACKAGE} is ${ACTION} on ${HOST}"

관련 프로그램

다음은 elog 관련 프로그램 꾸러미 목록입니다:

빌드 기록

포티지 elog 하위시스템에서, 꾸러미 빌드 로그는 실패/성공 여부 관계없이 디스크에 저장하거나 원격 수신자에게 메일로 보냅니다. 이 기능은 관리자가 나중에 다시 살펴보거나 티켓을 지원하는 시스템에 빌드 로그를 보냅니다.

설정

To enable Portage logging, edit /etc/portage/make.conf and set PORT_LOGDIR to a location where the log files should be stored. By default, Portage will use /var/log/portage:

파일 /etc/portage/make.conf
PORT_LOGDIR="/var/log/portage"

다음, 빌드 로그를 포티지에서 다루는 방법을 처리하는 몇가지 FEATURES 설정을 넣으십시오.

  • binpkg-logs 값을 설정하면, 바이너리 꾸러미 배포시에도 로그를 저장합니다
  • clean-logs 값을 설정하면, 일반 로그 파일을 지웁니다. 실행할 명령은 PORT_LOGDIR_CLEAN에 정의하며 파일 기본 유지 기간은 7일입니다.
  • split-log 값을 설정하면, 카테고리 이름을 지정한${PORT_LOGDIR}/build의 하위 디렉터리에 빌드 로그를 저장합니다.

지우기

clean-logs를 설정하면 포티지는 빌드 또는 언머지 처리 과정 이후 PORT_LOGDIR_CLEAN 에 설정한 명령을 실행합니다. 기본적으로 다음 명령을 사용합니다:

파일 /usr/share/portage/config/make.globals
PORT_LOGDIR_CLEAN="find \"\${PORT_LOGDIR}\" -type f ! -name \"summary.log*\" -mtime +7 -delete"

개별 명령어를 설정할 때 ${PORT_LOGDIR} 변수에 이스케이핑(또는 올바른 위치를 직접 입력)을 잊지 마십시오.

외부 자료