cloudwatch_logging 0.1.12

A simple library for logging to AWS CloudWatch Logs
Documentation

CloudWatch Logging SDK for Rust

This is a wrapper around the community made Rusoto SDK for AWS services. It provides a simple interface for logging to CloudWatch in an optimal manner, abstracting away the nuances like batching, ensuring flushes, logging panics, etc.

Usage

use cloudwatch_logging::Logger;

async fn example() {
    let mut logger = Logger::get("my-log-group", "my-log-stream").await;
    logger.info("Hello, world!").await;
    logger.error("Something went wrong!").await;
}

Features

  • log-batching: Batches logs together to reduce the number of API calls
  • log-panics: Logs panics to CloudWatch overwriting the default panic handler
  • DEBUG: Enables logging to stdout