IntelliJ, run via 'green arrow', and log/info!

  1. I am using log::info - Rust in my code.

  2. When running the command from command line ./target/debug/... , the statements from info! show up fine.

  3. When running the same code, but using the green arrow next to fn main in IntelliJ, the info! statements do not show up.

Question: how do I fix this so that info! shows up when using green arrow from IntelliJ ?

You can check the "Run/Debug Configuration" from the top right hand side (which also has a green triangle next to it). Check if the you are running it or debugging it (run corresponds to running in release mode, debug corresponds to running in debug mode). Additionally you can check if the RUST_LOG environment variable is set to something or not.