mirror of
https://github.com/ferrous-systems/embedded-trainings-2020.git
synced 2025-01-10 16:25:37 +00:00
add set log level
This commit is contained in:
parent
440c40a4ca
commit
2782a4ff39
1 changed files with 23 additions and 1 deletions
|
@ -1,5 +1,27 @@
|
||||||
# Running the Program
|
# Running the Program
|
||||||
|
|
||||||
|
## Setting the log level
|
||||||
|
|
||||||
|
Enter the appropriate command into the terminal you're using. This will set the log level for this session.
|
||||||
|
|
||||||
|
### MacOS & Linux
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ export DEFMT_LOG=warn
|
||||||
|
```
|
||||||
|
|
||||||
|
### PowerShell
|
||||||
|
```console
|
||||||
|
$ Env: DEFMT_LOG = "warn"
|
||||||
|
```
|
||||||
|
|
||||||
|
### Windows
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ set DEFMT_LOG=warn
|
||||||
|
```
|
||||||
|
## Running the Program
|
||||||
|
|
||||||
✅ Open the `src/bin/hello.rs` file and click the "Run" button that's hovering over the `main` function.
|
✅ Open the `src/bin/hello.rs` file and click the "Run" button that's hovering over the `main` function.
|
||||||
|
|
||||||
> Note: you will get the "Run" button if the Rust analyzer's workspace is set to the `beginner/apps` folder. This will be the case if the current folder in VS code (left side panel) is set to `beginner/apps`.
|
> Note: you will get the "Run" button if the Rust analyzer's workspace is set to the `beginner/apps` folder. This will be the case if the current folder in VS code (left side panel) is set to `beginner/apps`.
|
||||||
|
@ -14,7 +36,7 @@ Expected output:
|
||||||
``` console
|
``` console
|
||||||
$ cargo run --bin hello
|
$ cargo run --bin hello
|
||||||
Running `probe-run --chip nRF52840_xxAA target/thumbv7em-none-eabihf/debug/hello`
|
Running `probe-run --chip nRF52840_xxAA target/thumbv7em-none-eabihf/debug/hello`
|
||||||
(HOST) INFO flashing program (4 pages / 16.00 KiB)
|
(HOST) INFO flashing program (2 pages / 16.00 KiB)
|
||||||
(HOST) INFO success!
|
(HOST) INFO success!
|
||||||
────────────────────────────────────────────────────────────────────────────────
|
────────────────────────────────────────────────────────────────────────────────
|
||||||
INFO:hello -- Hello, world!
|
INFO:hello -- Hello, world!
|
||||||
|
|
Loading…
Reference in a new issue