# Forestry
A CLI logging library.
## Table of Contents
* [Installation](#installation)
* [Dependencies](#dependencies)
* [Usage](#usage)
* [Contributing](#contributing)
* [License](#license)
## Installation
To install forestry, simply add it to your Rust project via Cargo:
```bash
cargo add forestry
```
## Dependencies
Forestry depends on the `colored` crate for colorized output.
## Usage
Forestry is a simple logging library that allows you to log messages to the console with different levels of severity. Here's an example of how to use it:
```rust
use forestry::prelude::*;
let l = Logger::new();
l.i("This is an info message.");
l.w("This is a warning message.");
l.e("This is an error message.");
l.s("This is a success message.");
```
These calls can also be inlined as follows
```rust
use forestry::prelude::*
let l = Logger::new();
l.i("This is an info message.")
.w("This is a warning message.")
.e("This is an error message.")
.s("This is a success message.");
```
This will output the following to the console:
```
[0000:*] This is an info message.
[0001:~] This is a warning message.
[0002:!] This is an error message.
[0003:+] This is a success message.
```
It will also be coloured in most terminals.
All formatting is optional; please see the documentation at [Docs.rs](https://docs.rs/forestry/latest/forestry/index.html), specifically for `crate::logs::FormatOptions`
## Contributing
If you would like to contribute to forestry, please open an issue or submit a pull request.
## License
This code is dual-licensed under either the MIT or Apache 2.0 license, at your option. Please see the `LICENSE` file for more information.