Skip to content
This repository was archived by the owner on Oct 9, 2025. It is now read-only.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RustWatchman - Rust Tracing Writer

RustWatchman is a Rust library that provides a logging implementation for writing logs to Amazon CloudWatch. It uses the AWS SDK for Rust to implement the CloudWatch logging functionality.

Installation

  1. Install Rust and Cargo.
  2. Clone the repository.
  3. Run cargo build --release to build the project.
  4. Run cargo test to run the unit tests.

Usage

To use RustWatchman in your Rust project, add the follohttps://docs.rs/tracing/latest/tracing/wing to your Cargo.toml file:

[dependencies]
rust_watchman = { git = "https://github.com/prabhat0206/RustWatchman.git" }

Then, in your Rust code, import the Watchman struct from the rust_watchman crate:

use rust_watchman::Watchman;

You can then create a new instance of the Watchman struct and use it to write logs to CloudWatch:

#[tokio::main]
async fn main() {
    let sdk_config = aws_config::load_from_env().await;
    let writer = Watchman::new(sdk_config, "test".to_string(), "new".to_string()).await.get_writer();
    tracing_subscriber::fmt()
        .with_max_level(tracing::Level::INFO)
        .with_target(false)
        .with_writer(writer)
        .init();
    tracing::info!("Hello, world!");
}

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Helpful Links

Authors

Warning

This project is still in development and is not ready for production use. Use at your own risk.

About

This Rust library uses the AWS SDK for Rust to provide a logging implementation that writes logs to Amazon CloudWatch.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages