How do I adjust logging levels in Fusion 5.x?
In Fusion 5.x, Fusion Services come pre-configured to write messages to stdout and send messages to Logstash as outlined here.
In a containerized environment like Kubernetes, the recommended approach is to change the values.yaml file used when deploying a Fusion 5.x service. This will set a parameter which sets the logging level for a particular logger.
To update logging to debug for api-gateway, add “logLevelRoot: debug“ to “<cluster>_<namespace>_fusion_values.yaml“ as shown in below code. Make sure it at the same level as “javaToolOptions“.
Adjusting individual loggers
By default, loggers are named after the Java package+class name i.e. com.lucidworks.fusion.ml. To adjust the level one or more loggers without changing the overall default, add a parameter to the Java system properties within values.yaml.
If files are edited and log levels are changed, is a restart of the component required?
- it would have to be done on each pod so if you have three API pods, you’d have to edit each
- it requires a restart of the SERVICE process in the pod but not a restart/recreate of the pod.
- If the pod is recreated, the edits to the config file are wiped out.
Should we enable debugging in Production?
Generally we don’t recommend enabling debugging in production as it can impact performance. This should be ad-hoc on an as-needed basis.