Skip to content

Commit aae2aef

Browse files
authored
Merge pull request #88598 from mburke5678/wmco-debug-logging
Make debugLogging non-default
2 parents 9c5f217 + 4dd025f commit aae2aef

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// Module included in the following assemblies:
2+
//
3+
// windows_containers/enabling-windows-container-workloads.adoc
4+
5+
:_mod-docs-content-type: CONCEPT
6+
[id="wmco-configure-debug-logging_{context}"]
7+
= Configuring debug-level logging for the Windows Machine Config Operator
8+
9+
By default, the Windows Machine Config Operator (WMCO) is configured to use the `info` log level. You can change the log level to `debug` by editing the WMCO `Subscription` object.
10+
11+
.Procedure
12+
13+
. Edit the `windows-machine-config-operator` subscription in the `windows-machine-config-operator` namespace by using the following command:
14+
+
15+
[source,terminal]
16+
----
17+
$ oc edit subscription windows-machine-config-operator -n openshift-windows-machine-config-operator
18+
----
19+
20+
. Add the follwing parameters to the `.spec.config.env` stanza:
21+
+
22+
[source,yaml]
23+
----
24+
apiVersion: operators.coreos.com/v1alpha1
25+
kind: Subscription
26+
# ...
27+
name: windows-machine-config-operator
28+
namespace: openshift-windows-machine-config-operator
29+
# ...
30+
spec:
31+
# ...
32+
config:
33+
env:
34+
- name: ARGS <1>
35+
value: --debugLogging <2>
36+
----
37+
<1> Defines a list of environment variables that must exist in all containers in the pod.
38+
<2> Specifies the `debug` level of verbosity for log messages.
39+
40+
You can revert to the default `info` log level by removing the `name` and `value` parameters that you added.

windows_containers/enabling-windows-container-workloads.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ include::modules/installing-wmco-using-cli.adoc[leveloffset=+2]
5151

5252
include::modules/configuring-secret-for-wmco.adoc[leveloffset=+1]
5353

54+
include::modules/wmco-configure-debug-logging.adoc[leveloffset=+1]
55+
5456
include::modules/wmco-cluster-wide-proxy.adoc[leveloffset=+1]
5557

5658
.Additional resources

0 commit comments

Comments
 (0)