Skip to content
This repository was archived by the owner on Oct 21, 2020. It is now read-only.

Commit 7dbc456

Browse files
committed
Changed log levels to match npm log and winston
1 parent 66c1599 commit 7dbc456

File tree

3 files changed

+19
-38
lines changed

3 files changed

+19
-38
lines changed

src/Log/ConsoleAdapter.js

Lines changed: 9 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,6 @@ function ConsoleAdapter (customConsole) {
1010
this._console = customConsole || console;
1111
}
1212

13-
ConsoleAdapter.prototype.emergency = function(msg) {
14-
this._console.error.apply(this, arguments);
15-
};
16-
17-
ConsoleAdapter.prototype.alert = function(msg) {
18-
this._console.error.apply(this, arguments);
19-
};
20-
21-
ConsoleAdapter.prototype.critical = function(msg) {
22-
this._console.error.apply(this, arguments);
23-
};
24-
2513
ConsoleAdapter.prototype.error = function(msg) {
2614
this._console.error.apply(this, arguments);
2715
};
@@ -30,16 +18,20 @@ ConsoleAdapter.prototype.warning = function(msg) {
3018
this._console.warn.apply(this, arguments);
3119
};
3220

33-
ConsoleAdapter.prototype.notice = function(msg) {
34-
this._console.log.apply(this, arguments);
21+
ConsoleAdapter.prototype.info = function(msg) {
22+
this._console.info.apply(this, arguments);
3523
};
3624

37-
ConsoleAdapter.prototype.info = function(msg) {
38-
this._console.log.apply(this, arguments);
25+
ConsoleAdapter.prototype.verbose = function(msg) {
26+
this._console.debug.apply(this, arguments);
3927
};
4028

4129
ConsoleAdapter.prototype.debug = function(msg) {
42-
this._console.log.apply(this, arguments);
30+
this._console.debug.apply(this, arguments);
31+
};
32+
33+
ConsoleAdapter.prototype.silly = function(msg) {
34+
this._console.debug.apply(this, arguments);
4335
};
4436

4537
module.exports = ConsoleAdapter;

src/Log/LoggerInterface.js

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@
66
*/
77
function LoggerInterface() {}
88

9-
LoggerInterface.prototype.emergency = function(msg) {};
10-
LoggerInterface.prototype.alert = function(msg) {};
11-
LoggerInterface.prototype.critical = function(msg) {};
12-
LoggerInterface.prototype.error = function(msg) {};
13-
LoggerInterface.prototype.warning = function(msg) {};
14-
LoggerInterface.prototype.notice = function(msg) {};
15-
LoggerInterface.prototype.info = function(msg) {};
9+
LoggerInterface.prototype.silly = function(msg) {};
1610
LoggerInterface.prototype.debug = function(msg) {};
11+
LoggerInterface.prototype.verbose = function(msg) {};
12+
LoggerInterface.prototype.info = function(msg) {};
13+
LoggerInterface.prototype.warn = function(msg) {};
14+
LoggerInterface.prototype.error = function(msg) {};
1715

1816
module.exports = LoggerInterface;

src/Log/NullLogger.js

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,11 @@
11
function NullLogger () {
22
}
33

4-
NullLogger.prototype.emergency = function(msg) {};
5-
6-
NullLogger.prototype.alert = function(msg) {};
7-
8-
NullLogger.prototype.critical = function(msg) {};
9-
10-
NullLogger.prototype.error = function(msg) {};
11-
12-
NullLogger.prototype.warning = function(msg) {};
13-
14-
NullLogger.prototype.notice = function(msg) {};
15-
16-
NullLogger.prototype.info = function(msg) {};
17-
4+
NullLogger.prototype.silly = function(msg) {};
185
NullLogger.prototype.debug = function(msg) {};
6+
NullLogger.prototype.verbose = function(msg) {};
7+
NullLogger.prototype.info = function(msg) {};
8+
NullLogger.prototype.warn = function(msg) {};
9+
NullLogger.prototype.error = function(msg) {};
1910

2011
module.exports = NullLogger;

0 commit comments

Comments
 (0)