troubleshooting

How to Set Log Level to WARN in Docker-Compose for a Rust Application?

I'm trying to change the log level to WARN for my Rust application running in Docker-Compose standalone mode. I've set the RUST_LOG environment variable, but it doesn't seem to be having any effect. Here's how I've configured it in my docker-compose.yml:

environment:
   RUST_LOG: "warn"
   RUST_BACKTRACE: "0"

Despite this configuration, I'm still seeing INFO level logs. What am I doing wrong?

Se

Serhii Komarovskyi

Asked on Apr 09, 2024

It seems like you might need to specify the log level for the specific module as well as the general log level. Try setting the RUST_LOG environment variable like this in your docker-compose.yml:

environment:
   RUST_LOG: "warn,risingwave_connector_node=warn"

This configuration sets the default log level to WARN and also ensures that the risingwave_connector_node module logs at the WARN level.

Apr 09, 2024Edited by