This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.5.8. CoreDNS 로그 수준 설정
CoreDNS 로그 수준을 구성하여 로깅된 오류 메시지에 대한 세부 정보 양을 확인할 수 있습니다. CoreDNS 로그 수준에 유효한 값은 Normal,Debug, Trace 입니다. 기본 logLevel 은 Normal 입니다.
참고
오류 플러그인은 항상 활성화되어 있습니다. 다음 logLevel 설정은 다른 오류 응답을 보고합니다.
-
logLevel:Normal는 "errors" 클래스를 활성화합니다.log . { class error }} . -
logLevel:Debug는 "denial" 클래스:log . { 클래스 거부 오류 }를 활성화합니다. -
logLevel:Trace를 사용하면 "모든" 클래스:log . { 클래스 all }.
절차
logLevel을Debug로 설정하려면 다음 명령을 입력합니다.oc patch dnses.operator.openshift.io/default -p '{"spec":{"logLevel":"Debug"}}' --type=merge$ oc patch dnses.operator.openshift.io/default -p '{"spec":{"logLevel":"Debug"}}' --type=mergeCopy to Clipboard Copied! Toggle word wrap Toggle overflow logLevel을Trace로 설정하려면 다음 명령을 입력합니다.oc patch dnses.operator.openshift.io/default -p '{"spec":{"logLevel":"Trace"}}' --type=merge$ oc patch dnses.operator.openshift.io/default -p '{"spec":{"logLevel":"Trace"}}' --type=mergeCopy to Clipboard Copied! Toggle word wrap Toggle overflow
검증
원하는 로그 수준을 설정하려면 구성 맵을 확인합니다.
oc get configmap/dns-default -n openshift-dns -o yaml
$ oc get configmap/dns-default -n openshift-dns -o yamlCopy to Clipboard Copied! Toggle word wrap Toggle overflow