Loading
×Sorry to interrupt
CSS Error





How to enable debug log

Title
How to enable debug log
URL Name
how-to-enable-debug-log
Article Number
000001725
How to enable debug log

time  Aug 3, 24 • Knowledge • Article Number: 000001725


QUESTION
How do we enable debug log on different platforms?

ANSWER
VM:
There are two ways of changing the log level.
1. On /etc/kong/kong.conf file,  change log_level=debug
2. Add environment variable KONG_LOG_LEVEL=debug will override the setting on config file. 

Docker:
Normally we use environment variables to configure kong containers. Please add KONG_LOG_LEVEL=debug to your docker run command or docker compose file under environment.

Kubernetes:
You can modify deployment and add below to Kong container 
        - name: KONG_LOG_LEVEL
          value: debug
If you deploy with helm, you can add log_level under env as below
env:
  log_level: debug


Once the changes are made, please remember to reload/restart Kong. For Kubernetes, please remember to apply deployment file or upgrade your helm release to bring up a new pod with this configuration.

Dynamically:

From Kong Gateway 3.1.x.x and above, Dynamic Log Levels have been introduced to allow log levels to be increased and decreased without the need to restart Kong.

 

Caveat: Cannot work in DBLess mode as there is no admin-api available.

 

For more details, please review the documentation: 

https://docs.konghq.com/gateway/latest/production/logging/update-log-level-dynamically/


Was this article helpful?
0Likes0Dislikes
Loading