Bootstrap FreeKB - Kong Community Edition (KongCE) - Kong logs on Docker
Kong Community Edition (KongCE) - Kong logs on Docker


When Kong is deployed to a Docker container, the docker logs command can be used to view the Kong logs.

The docker ps command can be used to determine if the Kong container is running.

docker ps

CONTAINER ID     IMAGE              COMMAND                 CREATED         STATUS     PORTS     NAMES
d937372c09ab9    b939aa938add9913   "/docker-entrypoin..."  6 minutes ago   Created              kong001

 

Assuming the Kong container is running, the docker logs command can be used to view the Kong log.

docker logs kong001

 

The -t or --timestamps option can be included to include the datetime in the output.

docker logs --timestamps kong001

 

The --since and --until options can be used to only display events within a specified datetime.

docker logs --since 2020-11-14T08:00:00 --until 2020-11-14T11:00:00 kong001

 

The --tail=10 option can be included to only list the last 10 messages in the log.

docker logs --tail=10 kong001

 

You may need to use 2>&1 to grep the logs.

docker logs kong001 2>&1 | grep foo

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 899848 in the box below so that we can be sure you are a human.