Skip to content

Commit

Permalink
Merge e76b55b into 4bd5096
Browse files Browse the repository at this point in the history
  • Loading branch information
Pessimistress committed Dec 5, 2019
2 parents 4bd5096 + e76b55b commit a8e5912
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/api-reference/log/log.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Creates a new `Log` instance.

`log.enable(false)`

Accepts one argument `true` or `false`.
Accepts one argument `true` or `false`. When disabled, calling log methods do not print anything to the console.

### getLevel

Expand Down
5 changes: 2 additions & 3 deletions modules/core/src/lib/log.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const originalConsole = {
};

const DEFAULT_SETTINGS = {
enabled: false,
enabled: true,
level: 0
};

Expand Down Expand Up @@ -305,8 +305,7 @@ in a later version. Use \`${newUsage}\` instead`);
// PRIVATE METHODS

_shouldLog(logLevel) {
logLevel = normalizeLogLevel(logLevel);
return logLevel === 0 || (this.isEnabled() && this.getLevel() >= logLevel);
return this.isEnabled() && this.getLevel() >= normalizeLogLevel(logLevel);
}

_getLogFunction(logLevel, message, method, args = [], opts) {
Expand Down

0 comments on commit a8e5912

Please sign in to comment.