How to change log level at runtime
HiveMQ implements the logback framework and allows changes to the log configuration during run time.
It can be useful to increase the log level for HiveMQ or a specific extension. (See here how to configure a separate log level for extensions)
To change the log level simply edit the /opt/hivemq/confg/logback.xml file and adjust the level attribute in the associated <logger>.
Instructions
Locate the
logback.xmlfile: This file is located at /opt/hivemq/conf/ folder.Open the
logback.xmlfile: Use a text editor or IDE to open thelogback.xmlfile for editing.
please refer following example.<root level="${HIVEMQ_LOG_LEVEL:-INFO}"> <appender-ref ref="FILE"/> <appender-ref ref="CONSOLE"/> </root>to
<root level="DEBUG"> <appender-ref ref="FILE"/> <appender-ref ref="CONSOLE"/> </root>Save the changes: Once you have made the necessary modifications, save the
logback.xmlfile.By default, the HiveMQ broker scans this every 60 seconds. You do not need to restart the broker to make this change. You can find <configuration scan="true" scanPeriod="60 seconds"> this in the
logback.xml