About this project
logging-rs helps you add logging to your projects using simple macros.
Installing
Run the following command to add the package to your dependencies:
Git
To clone the repository locally using git run git clone https://github.com/ElBe-Development/logging-rs.git
.
Usage
To use logging-rs you need a configuration. It's best to keep it the same across multiple files. You then need to follow these steps:
-
Import the logging-rs crate:
use logging_rs;
-
Create a new logger object:
let logger = new;
-
Log the messages you want to log:
!; info!; warn!; error!; fatal!; log!; debug
Example
With the following rust code:
use logging_rs;
You will get the following output:
Where TIMESTAMP
is the current timestamp.
Contact
To contact us, get help or just chat with others, you can visit our discord server.