An open API service indexing awesome lists of open source software.

https://github.com/un-rust/urlogger

🖍️ Lightweight colored logger: `log(level, message)` with `RUST_LOG` filtering.
https://github.com/un-rust/urlogger

console log logger logging

Last synced: 3 months ago
JSON representation

🖍️ Lightweight colored logger: `log(level, message)` with `RUST_LOG` filtering.

Awesome Lists containing this project

README

          

# 🖍️ urlogger

![Crates.io Version](https://img.shields.io/crates/v/urlogger)
![Crates.io Total Downloads](https://img.shields.io/crates/d/urlogger)
![docs.rs](https://img.shields.io/docsrs/urlogger)
![GitHub commit activity](https://img.shields.io/github/commit-activity/m/un-rust/urlogger)
![GitHub Repo stars](https://img.shields.io/github/stars/un-rust/urlogger)

Lightweight colored logger: `log(level, message)` with `RUST_LOG` filtering.

**[Full documentation →](https://docs.rs/urlogger/)**

## Quick start

```sh
cargo add urlogger
```

## Usage

```rust
//! Demo: logs at all levels. Use `RUST_LOG=info` to filter.

use urlogger::{LogLevel, log};

fn main() {
log(LogLevel::Trace, "Hello, world!");
log(LogLevel::Debug, "Hello, world!");
log(LogLevel::Info, "Hello, world!");
log(LogLevel::Warn, "Hello, world!");
log(LogLevel::Error, "Hello, world!");
}
```

## License

Published under the [Apache-2.0](./LICENSE) license.
Made by [@UnRUST](https://github.com/un-rust) 💛





---

_🛠️ auto updated with [automd-rs](https://github.com/betterhyq/automd-rs)_