I Want My HiveMQ Logs All to STDOUT
If you're running HiveMQ in a containerized or cloud-native environment, it's often best practice to output logs directly to STDOUT. This allows your container orchestration system (like Kubernetes) to capture, forward, and manage logs more efficiently.
This short guide walks you through how to configure HiveMQ to send all logs, including the Enterprise Security Extension (ESE) access log, to STDOUT.
Instructions
1. Locate Your logback.xml
File
The HiveMQ logging configuration is controlled via the logback.xml
file. You’ll find it in:
$HIVEMQ_HOME/conf/logback.xml
2. Add special DEBUG Logger for ESE Access Logs
Locate the <logger>
section related to the Enterprise Security Extension and modify it as shown below:
<logger name="com.hivemq.extensions.ese.access" level="DEBUG">
<appender-ref ref="CONSOLE"/>
</logger>
This explicitly directs the ESE access logs to STDOUT with DEBUG
level verbosity.
3. Do not modify the Root Logger
Keep the <root>
section as-is so:
<root level="${HIVEMQ_LOG_LEVEL:-INFO}">
<appender-ref ref="FILE"/>
<appender-ref ref="CONSOLE"/>
</root>
This ensures all standard HiveMQ INFO logs are written to CONSOLE, in addition to ESE Access Log DEBUG logs with authentication and authorization events..
✅ What This Does
Sends all general HiveMQ logs to STDOUT.
Sends Enterprise Security Extension access logs to STDOUT.
Keeps file logging intact.
Restart HiveMQ to apply these changes. All your logs — including the ESE access log — will now stream directly to STDOUT, ready to be picked up by your logging system of choice.