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です。デフォルトのlog LevelはNormalです。
注記
エラープラグインは常に有効になっています。次のlogLevel設定は、さまざまなエラー応答を報告します。
-
logLevel:Normalは "errors" class:log . { class error }を有効にします。 -
logLevel:Debugは "denial" class:log . { class denial error }を有効にします。 -
logLevel:Traceは "all" class:log . { class 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
検証
目的のログレベルが設定されていることを確認するには、ConfigMap を確認します。
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