Logs for the Container Gateway in Docker
This topic provides sample commands that you can use to view and aggregate logs from your Container Gateway. The logs may contain Container Gateway-specific error messages, event messages, and warnings.
gateway93
This topic provides sample commands that you can use to view and aggregate logs from your Container Gateway. The logs may contain Container Gateway-specific error messages, event messages, and warnings.
Contents:
Viewing Logs
The Container Gateway can log to any external logging system supported by Docker. Use the
docker-compose logs
command to view logs.The following command prints the logs for all services that are defined in the
docker-compose.yml
file:$ docker-compose logs --follow
The following command prints logs for the service named "gateway" defined in the
docker-compose.yml
file:$ docker-compose --file docker-compose.yml logs --follow gateway
Aggregating Logs
Container Gateway logs can be aggregated and sent to any external logging system supported by Docker. The following example aggregates and sends the Container Gateway logs to the syslog server "syslog.domain.com" on port 514.
services: api-gateway: image: caapim/gateway:latest logging: driver: syslog options: syslog-address: "tcp://syslog.domain.com:514"