-
Suggestion
-
Resolution: Fixed
9.4.2 and 9.5.0 add public REST API to adjust debug logging and profiling settings dynamically. These behave like the existing admin page (for logging and profiling), and the settings are applied cluster wide and also persisted on restarts. These endpoints are also available on mirror nodes (in which case the setting will apply to the entire farm):
- `GET /rest/api/latest/logs/settings`
- `PUT /rest/api/latest/logs/settings`, e.g.
$ curl -u admin -X PUT --url '{MIRROR_URL}/rest/api/latest/logs/settings' -H "Content-Type: application/json" --data '{"debugLogging":true,"profiling":true}'
Previously:
- There was no way to enable/disable debug logging for multiple loggers on mirrors, particularly the same loggers that are modified when toggling debug logging in the admin page for application nodes. There exists REST API for setting log levels for the root logger or individual loggers, which is more cumbersome and doesn't apply cluster-wide on mirrors (and such settings are gone after restarts)
- Profiling could not be dynamically enabled/disabled on mirrors (unlike primary)
These endpoints should be beneficial in troubleshooting or diagnosing issues
Note that 9.5.0+ allows debug logging/profiling to be toggled via UI as well (requires both the upstream node and mirror farm to be on version 9.5.0+:
If you've upgraded to 9.4.2+ or 9.5.0+, the above settings will take precedence over the logging.profiling.enabled or logging.debug.enabled config properties, in which case you can remove those properties