mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
OSDOCS-3217: Add logLevel and operatorLogLevel APIs documentation
Please enter the commit message for your changes. Lines starting
This commit is contained in:
committed by
Andrea Hoffer
parent
08196861e5
commit
2b6509ec51
44
modules/nw-dns-loglevel.adoc
Normal file
44
modules/nw-dns-loglevel.adoc
Normal file
@@ -0,0 +1,44 @@
|
||||
// Module included in the following assemblies:
|
||||
// * networking/dns-operator.adoc
|
||||
|
||||
:_content-type: PROCEDURE
|
||||
[id="nw-dns-loglevel_{context}"]
|
||||
= Setting the CoreDNS log level
|
||||
|
||||
You can configure the CoreDNS log level to determine the amount of detail in logged error messages. The valid values for CoreDNS log level are `Normal`, `Debug`, and `Trace`. The default `logLevel` is `Normal`.
|
||||
|
||||
[NOTE]
|
||||
====
|
||||
The errors plug-in is always enabled. The following `logLevel` settings report different error responses:
|
||||
|
||||
* `logLevel`: `Normal` enables the "errors" class: `log . { class error }`.
|
||||
|
||||
* `logLevel`: `Debug` enables the "denial" class: `log . { class denial error }`.
|
||||
|
||||
* `logLevel`: `Trace` enables the "all" class: `log . { class all }`.
|
||||
====
|
||||
|
||||
.Procedure
|
||||
|
||||
* To set `logLevel` to `Debug`, enter the following command:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
$ oc patch dnses.operator.openshift.io/default -p '{"spec":{"logLevel":"Debug"}}' --type=merge
|
||||
----
|
||||
|
||||
* To set `logLevel` to `Trace`, enter the following command:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
$ oc patch dnses.operator.openshift.io/default -p '{"spec":{"logLevel":"Trace"}}' --type=merge
|
||||
----
|
||||
|
||||
.Verification
|
||||
|
||||
* To ensure the desired log level was set, check the config map:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
$ oc get configmap/dns-default -n openshift-dns -o yaml
|
||||
----
|
||||
30
modules/nw-dns-operatorloglevel.adoc
Normal file
30
modules/nw-dns-operatorloglevel.adoc
Normal file
@@ -0,0 +1,30 @@
|
||||
// Module included in the following assemblies:
|
||||
// * networking/dns-operator.adoc
|
||||
|
||||
:_content-type: PROCEDURE
|
||||
[id="nw-dns-operatorloglevel_{context}"]
|
||||
= Setting the CoreDNS Operator log level
|
||||
|
||||
Cluster administrators can configure the Operator log level to more quickly track down OpenShift DNS issues. The valid values for `operatorLogLevel` are `Normal`, `Debug`, and `Trace`. `Trace` has the most detailed information. The default `operatorlogLevel` is `Normal`. There are seven logging levels for issues: Trace, Debug, Info, Warning, Error, Fatal and Panic. After the logging level is set, log entries with that severity or anything above it will be logged.
|
||||
|
||||
* `operatorLogLevel: "Normal"` sets `logrus.SetLogLevel("Info")`.
|
||||
|
||||
* `operatorLogLevel: "Debug"` sets `logrus.SetLogLevel("Debug")`.
|
||||
|
||||
* `operatorLogLevel: "Trace"` sets `logrus.SetLogLevel("Trace")`.
|
||||
|
||||
.Procedure
|
||||
|
||||
* To set `operatorLogLevel` to `Debug`, enter the following command:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
$ oc patch dnses.operator.openshift.io/default -p '{"spec":{"operatorLogLevel":"Debug"}}' --type=merge
|
||||
----
|
||||
|
||||
* To set `operatorLogLevel` to `Trace`, enter the following command:
|
||||
+
|
||||
[source,terminal]
|
||||
----
|
||||
$ oc patch dnses.operator.openshift.io/default -p '{"spec":{"operatorLogLevel":"Trace"}}' --type=merge
|
||||
----
|
||||
@@ -23,3 +23,7 @@ include::modules/nw-dns-forward.adoc[leveloffset=+1]
|
||||
include::modules/nw-dns-operator-status.adoc[leveloffset=+1]
|
||||
|
||||
include::modules/nw-dns-operator-logs.adoc[leveloffset=+1]
|
||||
|
||||
include::modules/nw-dns-loglevel.adoc[leveloffset=+1]
|
||||
|
||||
include::modules/nw-dns-operatorloglevel.adoc[levelofset=+1]
|
||||
|
||||
Reference in New Issue
Block a user