Skip to content

Commit b53ede8

Browse files
committed
refactor(logger): use customError from #fromError, #warnFromError
resolve EDITOR-1577
1 parent 7b543d7 commit b53ede8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/logger/logger.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,16 @@ class Logger {
3131
return this._enabled;
3232
}
3333

34-
fromError(action, error, data = {}) {
35-
this.error(action, Object.assign(this._getErrorDetails(error), data));
34+
customError(severity, action, error, data = {}) {
35+
logMethodFactory(severity).bind(this)(action, Object.assign(this._getErrorDetails(error), data));
3636
}
3737

38-
warnFromError(action, error, data = {}) {
39-
this.warn(action, Object.assign(this._getErrorDetails(error), data));
38+
fromError(action, error, data = {}) {
39+
this.customError('error', action, error, data);
4040
}
4141

42-
customError(severity, action, error, data = {}) {
43-
logMethodFactory(severity).bind(this)(action, Object.assign(this._getErrorDetails(error), data));
42+
warnFromError(action, error, data = {}) {
43+
this.customError('warn', action, error, data);
4444
}
4545

4646
timer() {

0 commit comments

Comments
 (0)