[Exercise][13. Methods and Traits] Better output of example solution
Closed this issue · 3 comments
Alx-Lai commented
In Section13.4, there's an exercise code section to write a VerbosityFilter
of a Logger
; however, the logger uses eprintln!
macro to output the log, which output to stderr
. Therefore, the run result in the website shows only No output
.
Should we consider logging out messages from both stdout
and stderr
?
Comparison
In Rust Playground:
=====Standard Error=====
Compiling playground v0.0.1 (/playground)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.54s
Running `target/debug/playground`
verbosity=2: Uhoh
=====Standard Output====
In Comprehensive Rust:
No output
djmitche commented
Probably easiest to just change eprintln to println? Do you want to make up a PR?
Alx-Lai commented
djmitche commented
Thanks for spotting that! I think the change is fine with or without that fix.