# Hive MQ Logging : Assistance Required

**URL:** <https://community.hivemq.com/t/hive-mq-logging-assistance-required/1836>\
**Category:** HiveMQ Extensions\
**Created:** [February 22, 2023, 6:31pm UTC](https://community.hivemq.com/t/hive-mq-logging-assistance-required/1836 "2023-02-22T18:31:08Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![ASEWPER](https://avatars.discourse-cdn.com/v4/letter/a/76d3ee/32.png) [@ASEWPER](https://community.hivemq.com/u/ASEWPER)\
**Post date:** [February 22, 2023, 6:31pm UTC](https://community.hivemq.com/t/hive-mq-logging-assistance-required/1836/1 "2023-02-22T18:31:08Z")

</div>

> **[HiveMQ Extension - MQTT Message Log](https://www.hivemq.com/extension/mqtt-message-log-extension/)**
>
> The HiveMQ MQTT Message Log Extension provides the possibility to follow up on any clients communicating with the broker on the terminal.

Hi, Can someone share insight as to how to configure logging on our Hive MQ.  
Also can one also share insight as to where the log file will be stored?

Some info which might help :  
Hive MQ is running in a docker container on a Linux Server  
License type : industrial-edge-edition

Events which I require to be logged :

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/hivemq1/original/1X/29510f717532d139fa91a820d05b4f011ddc8171.png)

---

<div class="post-metadata">

**Author:** ![Daria\_H](https://avatars.discourse-cdn.com/v4/letter/d/dfb087/32.png) [@Daria\_H](https://community.hivemq.com/u/Daria_H)\
**Post date:** [February 23, 2023, 8:32am UTC](https://community.hivemq.com/t/hive-mq-logging-assistance-required/1836/2 "2023-02-23T08:32:54Z")

</div>

Hi @ASEWPER ,

Great to see your interest in MQTT and HiveMQ, welcome to the community!

## Installation

- Download the extension from the [HiveMQ Marketplace](https://www.hivemq.com/extension/mqtt-message-log-extension/) or [https://github.com/hivemq/hivemq-mqtt-message-log-extension/releases/download/1.1.3/hivemq-mqtt-message-log-extension-1.1.3.zip](https://github.com/hivemq/hivemq-mqtt-message-log-extension/releases/download/1.1.3/hivemq-mqtt-message-log-extension-1.1.3.zip)
- Unzip the content of the zip file to the `extensions` folder of your HiveMQ nodes, so the content is in the `$HIVEMQ_HOME/extensions/`:

```auto
$HIVEMQ_HOME
   └── extensions
           ├── hivemq-mqtt-message-log-extension
           ├── LICENSE.txt
           ├── README.html
           ├── README.txt
           ├── hivemq-extension.xml
           ├── hivemq-mqtt-message-log-extension-1.1.0.jar
           └── mqttMessageLog-example.properties

```

- **Rename** the `mqttMessageLog-example.properties` file to `mqttMessageLog.properties`
- Modify the `mqttMessageLog.properties` file for your needs. For example, to log everything:

```auto

#Log EVERYTHING

verbose=true
publish-received=true
publish-send=true
client-connect=true
connack-send=true
client-disconnect=true
subscribe-received=true
suback-send=true
unsubscribe-received=true
unsuback-send=true
ping-request-received=true
ping-response-send=true
puback-received=true
puback-send=true
pubrec-received=true
pubrec-send=true
pubrel-received=true
pubrel-send=true
pubcomp-received=true
pubcomp-send=true

```

MQTT messages will be logged to the `$HIVEMQ_HOME/log/hivemq.log` file (a.k.a _the broker log_).

I hope it helps.  
Kind regards,  
Dasha from HiveMQ Team

---

<div class="post-metadata">

**Author:** ![ASEWPER](https://avatars.discourse-cdn.com/v4/letter/a/76d3ee/32.png) [@ASEWPER](https://community.hivemq.com/u/ASEWPER)\
**Post date:** [February 23, 2023, 12:58pm UTC](https://community.hivemq.com/t/hive-mq-logging-assistance-required/1836/3 "2023-02-23T12:58:39Z")

</div>

Thank you @Daria_H ,

Appreciate the asssitance. 🙂  
I have tried this and can confirm that it works. Can you advise as to how I can exclude the PING REQUEST and PING RESPONSE messages from the logs?

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/hivemq1/original/1X/d3888082b1073508c8287ce9b04991e764c96c08.png)

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![ASEWPER](https://avatars.discourse-cdn.com/v4/letter/a/76d3ee/32.png) [@ASEWPER](https://community.hivemq.com/u/ASEWPER)\
**Post date:** [February 23, 2023, 12:59pm UTC](https://community.hivemq.com/t/hive-mq-logging-assistance-required/1836/4 "2023-02-23T12:59:17Z")

</div>

See screenshot below:

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/hivemq1/original/1X/a966df01968ed4b401330d879d2219bcabffb6b1.png)

---

<div class="post-metadata">

**Author:** ![Daria\_H](https://avatars.discourse-cdn.com/v4/letter/d/dfb087/32.png) [@Daria\_H](https://community.hivemq.com/u/Daria_H)\
**Post date:** [February 23, 2023, 1:07pm UTC](https://community.hivemq.com/t/hive-mq-logging-assistance-required/1836/5 "2023-02-23T13:07:01Z")

</div>

🙂 after updating the `mqttMessageLog.properties` file you can either restart the broker or disable and enable the extension.  
Disable the extension:

```auto
touch $HIVEMQ_HOME/extensions/hivemq-mqtt-message-log-extension/DISABLED
sleep 10

```

Enable the extension:

```auto
rm $HIVEMQ_HOME/extensions/hivemq-mqtt-message-log-extension/DISABLED

```

I hope it helps  
Kind regards,  
Dasha from HiveMQ Team

---

<div class="post-metadata">

**Author:** ![Hendrew](https://avatars.discourse-cdn.com/v4/letter/h/35a633/32.png) [@Hendrew](https://community.hivemq.com/u/Hendrew)\
**Post date:** [June 12, 2023, 9:04am UTC](https://community.hivemq.com/t/hive-mq-logging-assistance-required/1836/6 "2023-06-12T09:04:46Z")

</div>

Hi Team

I require some assistance regarding the log extension please.

Whenever we restart our docker container the log extension gets removed. How do we prevent that or what other ways can we try to keep the log extension?

Any help, guidance and advice is appreciated

Thanks  
Hendrew

---

<div class="post-metadata">

**Author:** ![Daria\_H](https://avatars.discourse-cdn.com/v4/letter/d/dfb087/32.png) [@Daria\_H](https://community.hivemq.com/u/Daria_H)\
**Post date:** [June 12, 2023, 2:23pm UTC](https://community.hivemq.com/t/hive-mq-logging-assistance-required/1836/7 "2023-06-12T14:23:39Z")

</div>

Hi @Hendrew ,

Thank you for your interest in HiveMQ. We’re delighted to have you as part of our community!

Regarding your inquiry, we kindly request further clarification on the specific extension you are referring to. Are you referring to the MQTT Message Log Extension found at [HiveMQ Extension - MQTT Message Log](https://www.hivemq.com/extension/mqtt-message-log-extension/)?

Additionally, it would be greatly appreciated if you could provide us with more details on how you currently run HiveMQ in a Docker container. Please include the following information:

1. The exact command you use to run HiveMQ.
2. If you are utilizing a custom Docker image, please share the `Dockerfile`.
3. If you are running HiveMQ via docker-compose, kindly provide us with your `docker-compose.yml` configuration file.

By providing us with these details, we will be able to offer you suitable guidance on integrating the extension into your Docker container.

We appreciate your cooperation.

Kind regards,  
Dasha from HiveMQ Team

---

<div class="post-metadata">

**Author:** ![Hendrew](https://avatars.discourse-cdn.com/v4/letter/h/35a633/32.png) [@Hendrew](https://community.hivemq.com/u/Hendrew)\
**Post date:** [June 14, 2023, 8:09am UTC](https://community.hivemq.com/t/hive-mq-logging-assistance-required/1836/8 "2023-06-14T08:09:38Z")

</div>

Hi Dasha

Thanks for getting back to me.

Can I organize a MS Teams call for us sometime please? I think that might be a bit easier and quicker.

Thanks  
Hendrew

---

<div class="post-metadata">

**Author:** ![Daria\_H](https://avatars.discourse-cdn.com/v4/letter/d/dfb087/32.png) [@Daria\_H](https://community.hivemq.com/u/Daria_H)\
**Post date:** [June 14, 2023, 2:50pm UTC](https://community.hivemq.com/t/hive-mq-logging-assistance-required/1836/9 "2023-06-14T14:50:23Z")

</div>

Hey @Hendrew ,

Thank you for your inquiry. Currently, on-call support is exclusively available to our esteemed HiveMQ customers. If you are a customer, we kindly request you to submit a support request through our Customer Support Portal at [support.hivemq.com](http://support.hivemq.com). Our dedicated support team will promptly assist you in resolving any issues or queries you may have.

If you are not a HiveMQ customer, we encourage you to utilize this community forum to share the information you require.

Usually, if you have Docker running on your laptop, you can effortlessly run HiveMQ with any extensions by adding the extension’s directory as a Docker volume. Here’s a step-by-step guide:

1. Download the extension zip file and unzip it to a directory of your choice.
2. Customize the configuration according to your needs.
3. Specify the path to the extension’s directory in the docker-compose.yml file as demonstrated below:

```auto
version: "3.5"
services:
  hivemq:
    image: hivemq/hivemq4:latest
    container_name: hivemq
    environment:
      - HIVEMQ_LOG_LEVEL=DEBUG
    ports:
      - "1883:1883"
      - "8080:8080"
    volumes:
      - path/to/my/hivemq-mqtt-message-log-extension:/opt/hivemq/extensions/hivemq-mqtt-message-log-extension
    networks:
      - hivemq_net

networks:
  hivemq_net:

```

1. Run in Docker and utilize the docker-compose.yml file:

```auto
docker-compose -f path/to/my/docker-compose.yml up

```

Please note that the sample docker-compose.yml file assumes that you have already installed Docker and have the necessary permissions to execute Docker commands.

I hope this guidance proves helpful. If you require any further assistance, please don’t hesitate to ask. We’re here to help!

Best regards,  
Dasha from HiveMQ Team
