Skip to content

Commit

Permalink
Set default log level to silent
Browse files Browse the repository at this point in the history
  • Loading branch information
cbetta committed Apr 6, 2018
1 parent 6a6ac7f commit a3dddcf
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ var amadeus = new Amadeus({
});
```

Additionally, to enable more verbose logging, you can set the appropriate level on your own logger, though the easiest way would be to enable debugging via a parameter on initialization, or using the `AMADEUS_LOG_LEVEL` environment variable. The available options are `warn` (default), `debug`, and `silent`.
Additionally, to enable more verbose logging, you can set the appropriate level on your own logger, though the easiest way would be to enable debugging via a parameter on initialization, or using the `AMADEUS_LOG_LEVEL` environment variable. The available options are `silent` (default), `warn`, and `debug`.

```js
var amadeus = new Amadeus({
Expand Down
2 changes: 1 addition & 1 deletion npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amadeus",
"version": "1.0.0-beta4",
"version": "1.0.0-beta5",
"description": "Node library for the Amadeus travel APIs",
"main": "lib/amadeus.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion spec/amadeus/client.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('Client', () => {
expect(client.customAppId).toBe(null);
expect(client.customAppVersion).toBe(null);
expect(client.http).toBe(https);
expect(client.logLevel).toBe('warn');
expect(client.logLevel).toBe('silent');
});

it('should allow for setting a custom logger', () => {
Expand Down
2 changes: 1 addition & 1 deletion src/amadeus/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import pkg from '../../package.json';
* the API
* @property {Object} logger the `console`-compatible logger used to debug calls
* @property {string} logLevel the log level for the client, available options
* are `debug`, `warn`, and `silent`
* are `debug`, `warn`, and `silent`. Defaults to 'silent'
* @property {string} host the hostname of the server API calls are made to
* @property {number} port the port the server API calls are made to
* @property {boolean} ssl wether an SSL request is made to the server
Expand Down
2 changes: 0 additions & 2 deletions src/amadeus/client/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ export class ResponseError {
}
}



// Protected

export class NetworkError extends ResponseError {
Expand Down
2 changes: 1 addition & 1 deletion src/amadeus/client/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Validator {

initializeLogger(client, options) {
client.logger = this.initOptional('logger', options, console);
client.logLevel = this.initOptional('logLevel', options, 'warn');
client.logLevel = this.initOptional('logLevel', options, 'silent');
}

initializeHost(client, options) {
Expand Down

0 comments on commit a3dddcf

Please sign in to comment.