Skip to content

Commit

Permalink
fix: Rename --logLevel to --log.
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj committed May 20, 2022
1 parent a63f49b commit b403267
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/moon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion Makefile.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion crates/utils/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/*",
Expand Down
8 changes: 4 additions & 4 deletions website/docs/setup-workspace.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down

0 comments on commit b403267

Please sign in to comment.