From f1f9a327032d3c45f1885c7634759c01b24c7369 Mon Sep 17 00:00:00 2001 From: itsscb Date: Wed, 17 Jul 2024 14:44:39 +0200 Subject: [PATCH] adds example and metadata --- Cargo.toml | 5 +++++ README.md | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 79da01d..a87ea01 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,11 @@ name = "tracing-layer-win-eventlog" version = "0.1.0" edition = "2021" +author = ["itsscb "] +description = "Layer for the tracing_subscriber to write to the Windows EventLog" +keywords = ["tracing", "tracing_subscriber","layer","eventlog","windows"] +license = "MIT" +repository = "https://github.com/itsscb/tracing-layer-win-eventlog" [dependencies] tracing = "0.1.40" diff --git a/README.md b/README.md index ad86ee3..a20d14c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,18 @@ # tracing-layer-win-eventlog Layer for the *tracing_subscriber* to write to the Windows EventLog + +## Usage +```rust +use tracing_subscriber::{layer::SubscriberExt as _, util::SubscriberInitExt as _}; + +fn main() { + println!("Hello, world!"); + + tracing_subscriber::registry() + .with(tracing_layer_win_eventlog::EventLogLayer) + .init(); + + tracing::info!(id = 40, "hello world!"); +} + +```