copyright: years: 2017, 2023 lastupdated: "2023-01-07"
Finding and viewing Voice Gateway log files
- SIP Orchestrator log files
- Media Relay log files
- Speech to Text Adapter log files
- Mounting a Docker volume for easier log collection
SIP Orchestrator log files
The log files for the SIP Orchestrator container are in the /logs/
directory. This directory contains the messages.log
file and verbose garbage collection logs, such as verbosegc.1.001.log
. If the LOG_LEVEL
is set to at least fine
, the directory also contains the trace.log
file, which contains additional details. If the SIP Orchestrator encounters any exceptions, the exceptions are summarized based on the day that they
occurred in log files in the ffdc
subdirectory.
To copy the log files off of the SIP Orchestrator container, run the following commands:
For Docker Engine:
docker cp voice-gateway-so:/logs/messages.log .
docker cp voice-gateway-so:/logs/trace.log .
For Kubernetes and IBM Cloud Kubernetes Service, where the namespace is default
and the pod name is pod1
:
kubectl cp default/pod1:logs -c vgw-sip-orchestrator .
Media Relay log files
Similarly, the main log file for the Media Relay, trace-mr.log
, is in the /vgw-media-relay/logs/
directory on its container. The trace-mr.log
file is best viewed by using Bunyan,
especially when the log level is set to DEBUG
. To copy the trace-mr.log
file off of the Media Relay container, run the following command:
For Docker Engine:
docker cp voice-gateway-mr:/vgw-media-relay/logs/trace-mr.log .
For Kubernetes and IBM Cloud Kubernetes Service, where the namespace is default
and the pod name is pod1
:
kubectl cp default/pod1:/vgw-media-relay/logs -c vgw-media-relay .
If Bunyan is installed, you can use the following command to view your log file:
bunyan trace-mr.log
Since the logs are in UTC, you can also use bunyan
to view the logs in your current local timezone:
bunyan --time local trace-mr.log
By default, the Media Relay log files are rotated on a daily basis unless a different rotation period is set on the MEDIA_RELAY_LOG_ROTATION_PERIOD
environment variable.
Log files are renamed such that trace-mr.log
is the current file that the Media Relay writes to, and older files are named trace-mr.X
, where X
is a number that represents how many days ago the log file
was rotated. For example, in the following log directory, trace-mr.log
is the active log file, trace-mr.log.0
are the logs from yesterday, and trace-mr.log.1
are logs from the day before yesterday.
+ /vgw-media-relay/logs/
+ -- trace-mr.log // Active log file
+ -- trace-mr.log.0 // Logs from yesterday
+ -- trace-mr.log.1 // Logs from 1 day ago
Log files are added up to the MEDIA_RELAY_LOG_ROTATION_FILE_COUNT
value, which is set to 10 by default. When the number of log files is reached, the oldest log file is deleted.
Note that in Version 1.0.0.2 and earlier, if you configure multiple cluster workers, each worker writes logs to its own directory under the /vgw-media-relay/logs/
directory.
Speech to Text Adapter log files
Logs for the Speech to Text Adapter container are output to the trace.log
file in the /stt-adapter/logs/
directory. To copy the log file off of the container, run the following command:
For Docker Engine:
docker cp voice-gateway-stt-adapter:/stt-adapter/logs/trace.log .
Mounting a Docker volume for easier log collection
Instead of running docker cp
commands to collect the logs from each container, you can mount a directory from the local file system to the containers. The containers write the logs directly to the mounted directory, so you can view
and collect the logs locally without needing to copy them from the containers each time.
To mount a local directory as a Docker volume, specify the directory mapping in host_directory:container_directory format on a volumes
key for each container in your docker-compose.yml
file. In the following
example, $PWD/logs/
denotes a logs
directory in the current working directory, which is mounted to the logs
directory for each respective container.
version: '2'
services:
sip.orchestrator:
# Rest of the configuration
...
# Mount the 'logs/' directory from the current working directory to the containers log directory
volumes:
- $PWD/logs/:/logs/
media.relay:
...
volumes:
- $PWD/logs/:/vgw-media-relay/logs/
stt.adapter:
...
volumes:
- $PWD/logs/:/stt-adapter/logs/
After you redeploy the containers by running the docker-compose up
command, the logs
directory is created in the current working directory where the command is run. From there, the log files for each container are created
and updated.