Published on

Changing log level of Rust program being run


I had to debug a compiled Rust binary I was running. In my case this binary was called via a Python script. I was struggling to find out how to increase the debug level until a colleague pointed out to me that when running a script/binary that calls a Rust binary you can very easily specify the log level.

Normally you would run the script like this:


To specify the log level simply run this as follows:

RUST_LOG=info python

This will change the log level to info. The standard levels seem to work:

  • info
  • debug
  • trace

More on this can be found here.