Debug Mode
Basic Debug Mode#
Enable basic debug mode just by setting apisix.enable_debug = true in conf/config.yaml file.
e.g Using both limit-conn and limit-count plugins for a /hello request, there will have a response header called Apisix-Plugins: limit-conn, limit-count.
If the information can be delivered via HTTP response header, for example, the plugin is in stream
subsystem, the information will be logged in the error log with warn level.
Advanced Debug Mode#
Enable advanced debug mode by modifying the configuration in conf/debug.yaml file. Because there will be a check every second, only the checker reads the #END flag, and the file would be considered as closed.
The checker would judge whether the file data changed according to the last modification time of the file. If there has any change, reload it. If there was no change, skip this check. So it's hot reload for enabling or disabling advanced debug mode.
| Key | Optional | Description | Default |
|---|---|---|---|
| hook_conf.enable | required | Enable/Disable hook debug trace. Target module function's input arguments or returned value would be printed once this option is enabled. | false |
| hook_conf.name | required | The module list name of hook which has enabled debug trace. | |
| hook_conf.log_level | required | Logging levels for input arguments & returned value. | warn |
| hook_conf.is_print_input_args | required | Enable/Disable input arguments print. | true |
| hook_conf.is_print_return_value | required | Enable/Disable returned value print. | true |
Example: