2.0.0 • Published 8 years ago
global-console-prefix v2.0.0
global-console-prefix
Add a your own prefix to every single console
message.
Usage
require("global-console-prefix")("[MONEY_APP]");
console.log("starting execution", {name: "crawler"});
console.info("starting execution", {name: "crawler"});
console.warn("starting execution", {name: "crawler"});
console.error("starting execution", {name: "crawler"});
//Output:
//[INFO][MONEY_APP] starting execution { name: 'crawler' }
//[INFO][MONEY_APP] starting execution { name: 'crawler' }
//[ERROR][MONEY_APP] starting execution { name: 'crawler' }
//[ERROR][MONEY_APP] starting execution { name: 'crawler' }
Remarks
Executes the default console
methods when no prefix is specified.
Hides the log level when a second parameter is specified.
require("global-console-prefix")("[MONEY_APP]", true);
2.0.0
8 years ago
2.0.0-beta.1
8 years ago
1.1.0
8 years ago
1.1.0-beta.4
8 years ago
1.1.0-beta.3
8 years ago
1.1.0-beta.2
8 years ago
1.1.0-beta.1
8 years ago
1.0.1
8 years ago
1.0.0
8 years ago
0.0.1
8 years ago