Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
frankthelen committed Dec 30, 2017
1 parent 26ddc15 commit 06111ee
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,20 +120,18 @@ class Rools {
if (type === 'debug' && !this.logDebug) return;
if (this.logDelegate) {
this.logDelegate({ type, ...others });
return;
} else {
this.logDefault({ type, ...others });
}
this.logDefault({ type, ...others });
}

logDefault({ message, rule, error }) { // eslint-disable-line class-methods-use-this
const msg = rule ? `# ${message} "${rule}"` : `# ${message}`;
/* eslint-disable no-console */
if (error) {
console.error(msg, error);
console.error(msg, error); // eslint-disable-line no-console
} else {
console.log(msg);
console.log(msg); // eslint-disable-line no-console
}
/* eslint-enable no-console */
}
}

Expand Down

0 comments on commit 06111ee

Please sign in to comment.