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!"); +} + +```