Skip to content

Commit

Permalink
warn->warning && git_commit->commit_hash
Browse files Browse the repository at this point in the history
  • Loading branch information
g-wilson committed Feb 26, 2019
1 parent 27c36c5 commit 3d0e718
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports.CuvvaError = CuvvaError;
const errorLevels = {
debug: 0,
info: 1,
warn: 2,
warning: 2,
error: 3,
fatal: 4,
};
Expand All @@ -29,7 +29,7 @@ function defaultHandler(level, error) {
const message = JSON.stringify({
_level: level,
_timestamp: new Date().toISOString(),
_git_commit: config.gitCommit,
_commit_hash: config.gitCommit,
_service: config.service,
...formattedError,
});
Expand Down Expand Up @@ -89,6 +89,7 @@ function logger(level) {

module.exports.debug = logger('debug');
module.exports.info = logger('info');
module.exports.warn = logger('warn');
module.exports.warn = logger('warning');
module.exports.warning = logger('warning');
module.exports.error = logger('error');
module.exports.fatal = logger('fatal');

0 comments on commit 3d0e718

Please sign in to comment.