Troubleshooting

Collecting debug logs

If the Twingate support teams asks you to enable and send us debug logging from your Connectors, you can follow the steps below.

Docker, ECS, Azure ContainerInstance, K8s, or other container services

If you are using Docker or another container service, you need to set the LOG_LEVEL environment variable and restart the container. LOG_LEVEL should be set to the value 7 to enable debug logs.

For example, in a Docker run command, adding --env LOG_LEVEL=7 will enable debug logging.

For existing containers we offer a script that will restart a container with an updated log level:

curl -s https://binaries.twingate.com/connector/docker-change-log-level.sh | sudo bash -s 7

To save logs from a Docker container, you can run the following command to save all logs to the current directory:

docker logs -t [container ID or name] 2> logs.txt

Note that 2> is required in the command above to save the full logging output from Docker.

The following command can be used to reset the log level back to default:

curl -s https://binaries.twingate.com/connector/docker-change-log-level.sh | sudo bash

systemd Service

If you are using the Twingate systemd service, for example, if using our AMI deployment process, you need to add the LOG_LEVEL variable to the Connector configuration file before restarting the service.

You can use the following steps:

  1. Add the line LOG_LEVEL=7 to the /etc/twingate/connector.conf file
  2. Restart the connector with sudo systemctl restart twingate-connector
  3. Save the logs with sudo journalctl --utc -u twingate-connector > logs.txt

Did this page help you?