mirror of
https://gitee.com/openharmony/third_party_rust_log
synced 2024-11-27 01:40:27 +00:00
parent
d711a6bf48
commit
0da4245527
10
README.md
10
README.md
@ -50,6 +50,16 @@ pub fn shave_the_yak(yak: &mut Yak) {
|
||||
}
|
||||
```
|
||||
|
||||
If you use Rust 2018, you can use instead the following code to import the crate macros:
|
||||
|
||||
```rust
|
||||
use log::{info, trace, warn};
|
||||
|
||||
pub fn shave_the_yak(yak: &mut Yak) {
|
||||
// …
|
||||
}
|
||||
```
|
||||
|
||||
## In executables
|
||||
|
||||
In order to produce log output executables have to use a logger implementation compatible with the facade.
|
||||
|
Loading…
Reference in New Issue
Block a user