# Configure EMQX log level

# Task target

  • How to configure the log level of EMQX cluster.

# Configure EMQX cluster

Save the above content as: emqx-log-level.yaml, and execute the following command to deploy the EMQX cluster:

kubectl apply -f emqx-log-level.yaml
1

The output is similar to:

emqx.apps.emqx.io/emqx created
1
  • Check whether the EMQX cluster is ready

# Verify whether the EMQX cluster log level configuration is effective

  • Use MQTT X to connect to the EMQX cluster to send messages

Click the button to create a new connection on the MQTT X page, and configure the EMQX cluster node information as shown in the figure. After configuring the connection information, click the connect button to connect to the EMQX cluster:

Then click the Subscribe button to create a new subscription, as shown in the figure, MQTT X has successfully connected to the EMQX cluster and successfully created the subscription:

After successfully connecting to the EMQX cluster and creating a subscription, we can send messages to the EMQX cluster, as shown in the following figure:

  • Use the command line to view EMQX cluster log information
kubectl logs emqx-core-0 -c emqx
1

The output is shown in the figure below:

From the figure, you can see the debug log information of connecting to the EMQX cluster using MQTT just now and sending messages.