This is a super simple logging library for Rust that prints logs to console as well as uploads those logs to S3 as plain text.
```rust use s3::creds::Credentials; use s3::Region; use s3logger::Logger;
use std::env;
fn main() { let mut logger = Logger::newblocking( "my-bucket", "my-logs.txt", Region::UsEast1, Credentials::fromenv()::unwrap(), );
logger.log("hello world!");
logger.log("This is some text");
logger.flush_blocking();
}
async fn mainasync() { let mut logger = Logger::new( "my-bucket", "my-logs.txt", Region::UsEast1, Credentials::fromenv()::unwrap(), ).await;
logger.log("Async and sync both use 'log'");
logger.log("The only difference is the 'new' and 'flush' functions");
logger.flush().await;
} ```