Skip to content

Commit

Permalink
added more information about log level
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesdbloom committed Nov 4, 2018
1 parent e2c0a86 commit c1441f7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 8 additions & 4 deletions README.md
Expand Up @@ -31,15 +31,15 @@ Then you can use either the `start_mockserver` or `stop_mockserver` functions as

```js
mockserver.start_mockserver({
serverPort: 1080
verbose: true
serverPort: 1080,
trace: true
});

// do something

mockserver.stop_mockserver({
serverPort: 1080
verbose: true
serverPort: 1080,
trace: true
});
```

Expand Down Expand Up @@ -79,6 +79,10 @@ grunt.initConfig({
grunt.loadNpmTasks('mockserver-node');
```

## Request Log

**Note:** The request log will only be captured in MockServer if the log level is `INFO` (or more verbose, i.e. `DEBUG` or `TRACE`) therefore to capture the request log and use the `/retrieve` endpoint ensure either the option `trace: true` or the command line switch `--verbose` is set.

### Options

#### options.serverPort
Expand Down
4 changes: 4 additions & 0 deletions index.js
Expand Up @@ -181,6 +181,10 @@ module.exports = (function () {
commandLineOptions.push("-proxyRemoteHost");
commandLineOptions.push(options.proxyRemoteHost);
}
if (options.logLevel) {
commandLineOptions.push("-logLevel");
commandLineOptions.push(options.logLevel);
}
if (options.verbose) {
console.log('Running \'java ' + commandLineOptions.join(' ') + '\'');
}
Expand Down

0 comments on commit c1441f7

Please sign in to comment.