Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

btrz-logger

Package Overview
Dependencies
Maintainers
2
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

btrz-logger - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

2

package.json
{
"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"}]]);
});
});
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc