dioxus-logger

Crates.iodioxus-logger
lib.rsdioxus-logger
version0.5.1
sourcesrc
created_at2022-11-05 20:13:38.549888
updated_at2024-05-13 20:24:38.234153
descriptionA logging utility to provide a standard interface whether you're targetting web desktop, fullstack, and more.
homepagehttps://github.com/DogeDark/dioxus-logger
repositoryhttps://github.com/DogeDark/dioxus-logger
max_upload_size
id706092
size6,920
Miles Murgaw (DogeDark)

documentation

README

📡 Dioxus Logger 🛰️

A logging utility to provide a standard interface whether you're targetting web, desktop, fullstack, and more.

Crates.io version Download docs.rs docs

dioxus-logger is a basic cross-platform facade for logging in Dioxus that uses the tracing crate.

use dioxus::prelude::*;
use dioxus_logger::tracing::{Level, info};
 
fn main() {
  dioxus_logger::init(Level::INFO).expect("logger failed to init");
  launch(App);
}

#[component]
fn App() -> Element {
  info!("App rendered");
  rsx! {
    p { "hi" }
  }
}

Platform Support

Dioxus logger will eventually support every target that Dioxus does. Currently mobile and TUI are not supported.

Installation

You can add dioxus-logger to your application by adding it to your dependencies.

[dependencies]
dioxus-logger = "0.5"

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.

Commit count: 17

cargo fmt