Overview
When working with support, from time to time we may need to collect debug logs. With logback, we can include a scan parameter to allow changes "on the fly", and avoid unnecessary restarts of the Dremio application which is not always possible in production environments
Applies To
All versions of Dremio
Details
With installation types such as AWSE and On-Prem, we can change thelogback.xml
to include the scan parameter
Changing:
<configuration>
to:
<configuration scan="true" scanPeriod="30 seconds">
The next step is simply restarting the Dremio process and then any subsequent changes to thelogback.xml
are scanned and replaced everyscanPeriod
.
With Kubernetes based deployments, firstly thelogback.xml
needs to be edited under the<HELM CHART HOME>/config
directory. Then the user will need to redeploy the helm charts, at this point the dremio pods will experience a restart, however this can be done at a planned time.
If you need to change the logging all you need to do is edit thedremio-config
config map on the Kubernetes cluster. For example:
kubectl edit configmap dremio-config
You will then open up and editor such asvi
, search for thelogback.xml
entry and edit as normal
logback.xml: |
<?xml version="1.0" encoding="UTF-8" ?>
<!--
...
<root>
<level value="${dremio.log.root.level:-info}"/>
<if condition='isDefined("dremio.log.path")'>
<then>
<appender-ref ref="text"/>
<appender-ref ref="json"/>
</then>
<else>
<appender-ref ref="console"/>
</else>
</if>
</root>
Once finished, save and the new config will be applied without a restart
"/private/var/folders/mn/qjh1d6d52hv5k5x8274lz46m0000gn/T/kubectl-edit-1153192427.yaml" 488L, 19246B written
configmap/dremio-config edited
Further Reading
Logback auto scan -https://logback.qos.ch/manual/configuration.html#autoScan
Config maps -https://kubernetes.io/docs/concepts/configuration/configmap/