borntyping / rust-simple_logger

A rust logger that prints all messages with a readable output format.
https://crates.io/crates/simple_logger
MIT License
220 stars 48 forks source link

Error: use of undeclared crate or module `log` #56

Closed ExtSolTech closed 2 years ago

ExtSolTech commented 2 years ago

Hi there,

I got a following error: use of undeclared crate or module log

here is my toml file: image

here is my test code: image

an here is the error message: image

Can you give any idea to me what i missed?

borntyping commented 2 years ago

You also need to depend on the log crate, which provides the log::warn! macro and others.

[dependencies]
log = { version = "^0.4.14", features = ["std"] }
simple_logger = "2.1.0"