How to change the log level of "hawk-apiserver" service
This document (000020986) is provided subject to the disclaimer at the end of this document.
Environment
Situation
Resolution
The possible values for the "loglevel" parameter are as follows:
debug
info
warning
error
fatal
panic
By default the "loglevel" parameter is not set in "/etc/hawk/server.json", but the default value is internally set to "info".
For example, to set the log level of the "hawk-apiserver" service to "debug" level, add the "loglevel" parameter to "/etc/hawk/server.json":
{
"loglevel": "debug",
"route": [
{
"handler": "monitor",
"path": "/monitor"
},
......
}
Restart the hawk service.
For example:
systemctl restart hawk.service
The "hawk-apiserver" debug messages will now be printed in the system message log.
For example:
... systemd[1]: Starting HA Web Konsole...
... systemd[1]: Started HA Web Konsole.
... hawk-apiserver[18102]: level=info msg="Reading /etc/hawk/server.json..."
... hawk-apiserver[18102]: level=info msg="Listening to https://0.0.0.0:7630\n"
... hawk-apiserver[18102]: level=debug msg="[proxy] / -> unix:///usr/share/hawk/tmp/hawk.sock"
... hawk-apiserver[18102]: level=debug msg="[proxy] /login -> unix:///usr/share/hawk/tmp/hawk.sock"
... hawk-apiserver[18102]: level=debug msg="[file] /usr/share/hawk/public/assets/vendor-420e822e02c390e16b4686904ca61330ef4e6a5b1004951429196a1f3a245f62.css"
... hawk-apiserver[18102]: level=debug msg="[file] /usr/share/hawk/public/assets/authentication-12e2206a5fce0a847386ab20b1906c2d9311f4a3e84f1ed7853c59429a8c5e39.css"
Cause
Status
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000020986
- Creation Date: 24-Feb-2023
- Modified Date:01-Mar-2023
-
- SUSE Linux Enterprise High Availability Extension
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com