I am trying to troubleshoot an issue with a Docker container and need more detailed logs. The current logs are not providing enough information. How can I get more informative logs when running a Docker container?
Martin Bagge / brother
Asked on Jun 07, 2024
To get more informative logs when running a Docker container, you can set the RUST_LOG
and RUST_BACKTRACE
environment variables inside the container. Here's how you can do it:
docker run -d --entrypoint /opt/tabby/bin/tabby-cpu -it -p 8080:8080 -v $HOME/.tabby:/data -e RUST_LOG=debug -e RUST_BACKTRACE=full tabbyml/tabby serve --model StarCoder-1B
By setting RUST_LOG=debug
, you enable debug level logging, and RUST_BACKTRACE=full
provides a full backtrace when an error occurs. This will help you gather more detailed information from the logs.