Skip to content

Commit

Permalink
Change --logLevel to --log-level
Browse files Browse the repository at this point in the history
--logLevel is the only switch using camelcase.  Other switches use kebab
case.

Signed-off-by: Simon Marchi <simon.marchi@ericsson.com>
  • Loading branch information
Simon Marchi authored and simark committed Mar 28, 2018
1 parent ea79ea1 commit a154860
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"program": "${workspaceRoot}/examples/electron/src-gen/frontend/electron-main.js",
"protocol": "inspector",
"args": [
"--loglevel=debug",
"--log-level=debug",
"--hostname=localhost",
"--no-cluster",
"--app-project-path=${workspaceRoot}/examples/electron",
Expand All @@ -42,7 +42,7 @@
"name": "Launch Backend",
"program": "${workspaceRoot}/examples/browser/src-gen/backend/main.js",
"args": [
"--loglevel=debug",
"--log-level=debug",
"--port=3000",
"--no-cluster",
"--app-project-path=${workspaceRoot}/examples/browser",
Expand All @@ -68,7 +68,7 @@
"name": "Launch Backend (eclipse.jdt.ls)",
"program": "${workspaceRoot}/examples/browser/src-gen/backend/main.js",
"args": [
"--loglevel=debug",
"--log-level=debug",
"--root-dir=${workspaceRoot}/../eclipse.jdt.ls/org.eclipse.jdt.ls.core",
"--port=3000",
"--no-cluster",
Expand Down Expand Up @@ -117,4 +117,4 @@
"webRoot": "${workspaceRoot}"
}
]
}
}
2 changes: 1 addition & 1 deletion doc/Developing.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ Let assume you have to work for instance in the `@theia/navigator` extension. Bu
- All variations of `--inspect` flag are supported: https://nodejs.org/en/docs/inspector/#command-line-options.
- Attach the debugger to the logged port.

In order to look up `server-name` run the backend server with `--logLevel=debug` flag to enable logging of IPC servers instantiation.
In order to look up `server-name` run the backend server with `--log-level=debug` flag to enable logging of IPC servers instantiation.
You should be able to see message of `[${server-name}: ${server-PID}]: IPC started` format, like `[nsfw-watcher: 37557] IPC started`.

## Testing
Expand Down
2 changes: 1 addition & 1 deletion examples/browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"build": "theia build --mode development",
"watch": "yarn build --watch --mode development",
"start": "theia start",
"start:debug": "yarn start --logLevel=debug",
"start:debug": "yarn start --log-level=debug",
"test": "wdio",
"coverage:compile": "yarn build --config coverage-webpack.config.js",
"coverage:remap": "remap-istanbul -i coverage/coverage.json -o coverage/coverage-final.json --exclude 'frontend/index.js' && rimraf coverage/coverage.json",
Expand Down
4 changes: 2 additions & 2 deletions examples/electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@
"build": "theia build --mode development",
"watch": "yarn build --watch --mode development",
"start": "theia start",
"start:debug": "yarn start --loglevel=debug",
"start:debug": "yarn start --log-level=debug",
"test": "electron-mocha --timeout 60000 --require ts-node/register \"./test/**/*.espec.ts\"",
"test:ui": "wdio wdio.conf.js"
},
"devDependencies": {
"@theia/cli": "^0.3.7"
}
}
}
4 changes: 2 additions & 2 deletions packages/core/src/node/bunyan-logger-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ export class LogLevelCliContribution implements CliContribution {
logLevel: string;

configure(conf: yargs.Argv): void {
conf.option('logLevel', {
conf.option('log-level', {
description: 'Sets the log level',
default: 'info',
choices: ['trace', 'debug', 'info', 'warn', 'error', 'fatal']
});
}

setArguments(args: yargs.Arguments): void {
this.logLevel = args['logLevel'];
this.logLevel = args['log-level'];
}
}

Expand Down

0 comments on commit a154860

Please sign in to comment.