6.8. CoreDNS 로그 수준 설정

CoreDNS 로그 수준을 구성하여 로그된 오류 메시지에 대한 세부 정보를 확인할 수 있습니다. CoreDNS 로그 수준에 유효한 값은 Normal,Debug, Trace 입니다. 기본 logLevelNormal 입니다.

참고

오류 플러그인은 항상 활성화되어 있습니다. 다음 logLevel 설정은 다른 오류 응답을 보고합니다.

  • Loglevel:Normal 은 "errors" 클래스를 활성화합니다. log . { 클래스 오류 }.
  • Loglevel:Debug 는 "denial" 클래스를 활성화합니다. log . { 클래스 거부 오류} }.
  • Loglevel:Trace 는 "all" 클래스를 활성화합니다. log . { 클래스 all }.

절차

  • logLevelDebug 로 설정하려면 다음 명령을 입력합니다.

    $ oc patch dnses.operator.openshift.io/default -p '{"spec":{"logLevel":"Debug"}}' --type=merge
  • logLevelTrace 로 설정하려면 다음 명령을 입력합니다.

    $ oc patch dnses.operator.openshift.io/default -p '{"spec":{"logLevel":"Trace"}}' --type=merge

검증

  • 원하는 로그 수준이 설정되었는지 확인하려면 구성 맵을 확인합니다.

    $ oc get configmap/dns-default -n openshift-dns -o yaml