Access Container Logs¶
This topic provides sample commands that you can use to view and aggregate logs from your DICOS API Gateway Manager installation. The logs may contain container-specific error messages, event messages, and warnings as well as the log of the Gateway Manager itself.
Viewing Logs¶
The container 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 "dagm" defined in the docker-compose.yml file:
$ docker-compose --file docker-compose.yml logs --follow dagm
The following command prints the last 100 lines of logs for the service named "dagm" defined in the docker-compose.yml file:
$ docker-compose --file docker-compose.yml logs --tail 100 --follow dagm
Aggregating Logs¶
Container logs can be aggregated and sent to any external logging system supported by Docker. The following example aggregates and sends the container logs to the syslog server "syslog-server.example.com" on port 123.
docker-compose.yml¶
services:
dagm:
image: dicosgmbh/dagm:latest
logging:
driver: syslog
options:
syslog-address: "tcp://syslog-server.example.com:123"
Logs for DICOS Support¶
If the DICOS support asks you to provide additional logs, please execute following commands:
docker-compose exec dagm cat /var/www/html/var/logs/nostromo-$(date +%Y-%m-%d).log > nostromo-$(date +%Y-%m-%d).log
docker-compose logs dagm> dagm-log-$(date +%Y-%m-%d).log
docker-compose logs dagmdb > dagmdb-log-$(date +%Y-%m-%d).log
Please provide the DICOS support the following files:
- nostromo-{date}.log
- dagm-log-{date}.log
- dagmdb-log-{date}.log