btrz-logger
Advanced tools
Comparing version 1.3.0 to 1.4.0
{ | ||
"name": "btrz-logger", | ||
"version": "1.3.0", | ||
"version": "1.4.0", | ||
"description": "A multi-transport logger", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -14,3 +14,3 @@ "use strict"; | ||
error(tokens) { | ||
let msg = `${tokens.level.toUpperCase()}\t${tokens.date} ${tokens.time}\t${tokens.serverId}\t${tokens.message}`; | ||
let msg = `${tokens.level.toUpperCase()}\t${tokens.date} ${tokens.time}\t${tokens.serverId}\t${tokens.traceId}\t${tokens.message}`; | ||
@@ -17,0 +17,0 @@ if (tokens.data) { |
@@ -61,2 +61,3 @@ "use strict"; | ||
serverId: options && options.serverId ? options.serverId : "", | ||
traceId: options && options.traceId ? options.traceId : "", | ||
data: serialized.length > 0 ? serialized : "" | ||
@@ -63,0 +64,0 @@ }; |
"use strict"; | ||
describe("console", function () { | ||
describe.skip("console", function () { | ||
@@ -11,3 +11,6 @@ let logger; | ||
LogEntriesLogger = require("../index").LogEntriesLogger; | ||
logger = new Logger(); | ||
logger = new Logger({ | ||
serverId: "12345", | ||
traceId: "trace_id_here" | ||
}); | ||
logger.addLogger(new ConsoleLogger()); | ||
@@ -18,7 +21,7 @@ logger.addLogger(new LogEntriesLogger({token: "fake-token-here"})); | ||
it("should log to console", function () { | ||
// logger.info("info", {info: "some"}); | ||
// logger.error({info: "some"}, "some"); | ||
// logger.error({info: "some"}, {tokens: "token"}); | ||
// logger.error({info: "some"}, [{tokens: "token"}, [{second: "two"}]]); | ||
logger.info("info", {info: "some"}); | ||
logger.error({info: "some"}, "some"); | ||
logger.error({info: "some"}, {tokens: "token"}); | ||
logger.error({info: "some"}, [{tokens: "token"}, [{second: "two"}]]); | ||
}); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1
8824
12
232