Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
breakoutModewide
languagexml
<appender name="FILE-RBAC" class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${hivemq.home}/log/file-rbac.log</file>
        <append>true</append>
        <encoder>
            <pattern>%-30(%d [%thread]) - %level - %logger{32} - %msg%n%ex</pattern>
        </encoder>
        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
            <!-- daily rollover -->
            <fileNamePattern>${hivemq.home}/log/pval_plugin_eventfile-rbac.%d{yyyy-MM-dd}.log.gz</fileNamePattern>
            <!-- keep 30 days' worth of history -->
            <maxHistory>30</maxHistory>
        </rollingPolicy>
</appender>

...

appender-ref must match the name of our defined appender

</appender>
Code Block
languagexml
<logger name="com.hivemq.extensions.rbac" level="INFO" additivity="false">
	<appender-ref ref="FILE-RBAC"/>
</logger>

name=“com.hivemq.extensions.rbac” must be modified to match the package of your custom extension

In order to apply the new logging configuration, we will need to restart HiveMQ.

...