diff --git a/CHANGELOG.md b/CHANGELOG.md index 6dc90df..bbb8591 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# Version 4.0.0 + +- Upgrade to AWS SDK release (1.x) versions. +- Switch error handling to anyhow. +- Switch logging to tracing. + +I'm treating the logging change, moving log level from a command line +option to an environment variable, as a breaking change. + # Version 3.0.2 And, um, correct the broken download links in the README. diff --git a/Cargo.lock b/Cargo.lock index e72f097..2add5b6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1136,7 +1136,7 @@ dependencies = [ [[package]] name = "query-rds-data" -version = "3.1.0" +version = "4.0.0" dependencies = [ "anyhow", "aws-config", diff --git a/Cargo.toml b/Cargo.toml index 2c470b0..02d81ca 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "query-rds-data" -version = "3.1.0" +version = "4.0.0" authors = ["Bruce Adams "] edition = "2021" categories = ["database", "command-line-utilities"] diff --git a/README.md b/README.md index ad96da5..2918fab 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,9 @@ $ cargo build # The first build takes longer, with more output $ target/debug/query-rds-data --help Query AWS RDS Data from the command line +You can set the environment variable `RUST_LOG` to adjust +logging, for example `RUST_LOG=trace query-rds-data`. + Usage: query-rds-data [OPTIONS] Arguments: @@ -79,15 +82,15 @@ Arguments: Options: -p, --profile - AWS source profile to use. This name references an entry in ~/.aws/config + AWS source profile to use. This name references an + entry in ~/.aws/config [env: AWS_PROFILE=] -r, --region AWS region to target - [env: AWS_DEFAULT_REGION=] - [default: us-east-1] + [env: AWS_REGION=] -c, --db-cluster-identifier RDS cluster identifier @@ -106,16 +109,15 @@ Options: Possible values: - csv: CSV output, including a header line - - json: An array of JSON Objects, {"field_name": field_value, …} + - json: A JSON Object. For example: + {"numberOfRecordsUpdated": 0, "records": [{"id": 1, + "name": "bruce", "amount": 0.05}]} -d, --database Database name [env: AWS_RDS_DATABASE=] - -v, --verbose... - Increase logging verbosity (-v, -vv, -vvv, etc) - -h, --help Print help (see a summary with '-h') diff --git a/src/main.rs b/src/main.rs index e8a18e7..10440df 100644 --- a/src/main.rs +++ b/src/main.rs @@ -22,12 +22,18 @@ use tracing_subscriber::{fmt, prelude::*, EnvFilter}; enum Format { /// CSV output, including a header line. Csv, - /// An array of JSON Objects, {"field_name": field_value, …}. + /// A JSON Object. For example: + /// {"numberOfRecordsUpdated": 0, + /// "records": [{"id": 1, + /// "name": "bruce", + /// "amount": 0.05}]} Json, } -/// You can set the environment variable `RUST_LOG` to -/// adjust logging, for example `RUST_LOG=trace aws-caller-id` +/// Query AWS RDS Data from the command line +/// +/// You can set the environment variable `RUST_LOG` to adjust +/// logging, for example `RUST_LOG=trace query-rds-data`. #[derive(Clone, Debug, Parser)] #[command(about, author, version)] struct MyArgs {