From b40326727d4b41a8b77009d38f8a7eafb4680187 Mon Sep 17 00:00:00 2001 From: Miles Johnson Date: Thu, 19 May 2022 18:18:08 -0700 Subject: [PATCH] fix: Rename --logLevel to --log. --- .github/workflows/moon.yml | 2 +- Makefile.toml | 2 +- crates/cli/src/app.rs | 2 +- crates/cli/src/lib.rs | 2 +- crates/utils/src/test.rs | 2 +- package.json | 4 ++-- website/docs/setup-workspace.mdx | 8 ++++---- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/moon.yml b/.github/workflows/moon.yml index a9a743ddce2..3299a991d2e 100644 --- a/.github/workflows/moon.yml +++ b/.github/workflows/moon.yml @@ -56,6 +56,6 @@ jobs: - uses: actions-rs/cargo@v1 with: command: run - args: -- --logLevel trace ci + args: -- --log trace ci env: CLICOLOR_FORCE: true diff --git a/Makefile.toml b/Makefile.toml index d72315a6733..c5c8768bacd 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -29,7 +29,7 @@ args = ["clippy", "--workspace", "--all-targets"] [tasks.pre-test] command = "cargo" -args = ["run", "--", "--logLevel", "debug", "setup"] +args = ["run", "--", "--log", "debug", "setup"] cwd = "./tests/fixtures/cases" [tasks.run-test] diff --git a/crates/cli/src/app.rs b/crates/cli/src/app.rs index 6a5e8304e10..fd1a9fcf380 100644 --- a/crates/cli/src/app.rs +++ b/crates/cli/src/app.rs @@ -168,7 +168,7 @@ pub struct App { pub cache: CacheMode, #[clap(arg_enum, long, help = "Lowest log level to output", default_value_t)] - pub log_level: LogLevel, + pub log: LogLevel, #[clap(subcommand)] pub command: Commands, diff --git a/crates/cli/src/lib.rs b/crates/cli/src/lib.rs index 9095414aa12..5e00dd3cbe7 100644 --- a/crates/cli/src/lib.rs +++ b/crates/cli/src/lib.rs @@ -36,7 +36,7 @@ pub async fn run_cli() { let args = App::parse(); // Setup logging - Logger::init(map_log_level(args.log_level)); + Logger::init(map_log_level(args.log)); // Setup caching if env::var("MOON_CACHE").is_err() { diff --git a/crates/utils/src/test.rs b/crates/utils/src/test.rs index de016385ddb..49552035320 100644 --- a/crates/utils/src/test.rs +++ b/crates/utils/src/test.rs @@ -96,7 +96,7 @@ pub fn create_moon_command_in(path: &Path) -> assert_cmd::Command { // Standardize file system paths for testing snapshots cmd.env("MOON_TEST_STANDARDIZE_PATHS", "true"); // Uncomment for debugging - // cmd.arg("--logLevel"); + // cmd.arg("--log"); // cmd.arg("trace"); cmd } diff --git a/package.json b/package.json index 0a83304bd94..7844e3ce300 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,8 @@ "version:bump:bin": "bash ./scripts/version/bumpBinaryVersions.sh", "version:bump:force": "bash ./scripts/version/forceBumpAllVersions.sh", "build": "NODE_ENV=production packemon pack --addEngines --addExports --declaration", - "type": "target/debug/moon --logLevel trace run :typecheck", - "moon": "target/debug/moon --logLevel trace" + "type": "target/debug/moon --log trace run :typecheck", + "moon": "target/debug/moon --log trace" }, "workspaces": [ "packages/*", diff --git a/website/docs/setup-workspace.mdx b/website/docs/setup-workspace.mdx index bbca42b552c..d85ea60ad9c 100644 --- a/website/docs/setup-workspace.mdx +++ b/website/docs/setup-workspace.mdx @@ -35,8 +35,8 @@ node: version: '16.15.0' ``` -Let's now run [`moon --logLevel debug setup`](./commands/setup) to verify that Node.js is downloaded -and installed correctly. Pretty cool right? +Let's now run [`moon --log debug setup`](./commands/setup) to verify that Node.js is downloaded and +installed correctly. Pretty cool right? ## Configuring a package manager @@ -62,8 +62,8 @@ node: version: '3.2.0' ``` -Once again, let's run [`moon --logLevel debug setup`](./commands/setup) to verify the package -manager is installed, and also take note that Node.js is _already_ installed. Based on the example +Once again, let's run [`moon --log debug setup`](./commands/setup) to verify the package manager is +installed, and also take note that Node.js is _already_ installed. Based on the example configuration above, we'll be switching from npm (the default) to yarn. ## Configuring a version control system