📡 Dioxus Logger 🛰️

A logging utility to provide a standard interface whether you're targetting web, desktop, or mobile with Dioxus.

Crates.io version Download docs.rs docs

dioxus-logger is a (planned-to-be) feature-rich logger for Dioxus that uses the log crate to provide a standard interface for all your logging needs.

Current & Planned Features - [x] stdio logging (Web, Desktop) - Mobile to come - [x] Custom log format - Basic Implementation Finished - [ ] Sending logs over HTTP to an API - [ ] Logging to a file - [ ] Logging to Sentry? - [ ] Timestamps - [ ] Feature flags for faster compilation

This library is under development. Expect breaking changes.

```rust, ignore use dioxus::prelude::*; use log::{LevelFilter, info};

fn main() { dioxus_logger::init(LevelFilter::Info).expect("failed to init logger"); dioxus::web::launch(app); }

fn app(cx: Scope) -> Element { info!("app component rendered!"); rsx!(cx, p { "Hello, Dioxus!" }) } ```

Platform Support

Dioxus logger will eventually support every target that Dioxus does. Currently only web and desktop platforms are supported.

Installation

You can add dioxus-logger to your application by adding it to your dependencies. toml [dependencies] dioxus-logger = "x.x.x"

License

This project is licensed under the [MIT license].

Every contribution intentionally submitted for inclusion in dioxus-logger by you, shall be licensed as MIT, without any additional terms or conditions.