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

@janiscommerce/log

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@janiscommerce/log - npm Package Compare versions

Comparing version 5.0.11 to 5.0.12

23

lib/log.js

@@ -89,2 +89,4 @@ 'use strict';

this.start();
if(!Array.isArray(logs))

@@ -100,2 +102,12 @@ logs = [logs];

static start() {
// this method is called in janiscommerce packages handlers to ensure end layer extension (even when no logs loaded in function)
if(this.traceExtensionIsEnabled() && shouldAddEndedListener()) {
Events.on('janiscommerce.ended', this.flushLogsOnEnded);
endedListenerWasAdded();
}
}
static addClientAndDateCreated(logs, client) {

@@ -118,6 +130,10 @@

static shouldAddLogsLocally(logs) {
return process.env.JANIS_TRACE_EXTENSION_ENABLED
return this.traceExtensionIsEnabled()
&& logs.length < MAX_LOGS_PER_LOCAL_BATCH;
}
static traceExtensionIsEnabled() {
return !!process.env.JANIS_TRACE_EXTENSION_ENABLED;
}
/**

@@ -146,7 +162,2 @@ * Send multiple logs directly to Firehose. If you're implementing a Janis Service, you should be using the add() method

if(shouldAddEndedListener()) {
Events.on('janiscommerce.ended', this.flushLogsOnEnded);
endedListenerWasAdded();
}
} catch(err) {

@@ -153,0 +164,0 @@

{
"name": "@janiscommerce/log",
"version": "5.0.11",
"version": "5.0.12",
"description": "A package for creating logs in Janis Trace Service",

@@ -5,0 +5,0 @@ "main": "lib/log.js",

@@ -32,4 +32,6 @@ export = Log;

static add(client: string, logs: LogData | Array<LogData>): Promise<void>;
static start(): void;
static addClientAndDateCreated(logs: any, client: any): any;
static shouldAddLogsLocally(logs: any): boolean;
static traceExtensionIsEnabled(): boolean;
/**

@@ -36,0 +38,0 @@ * Send multiple logs directly to Firehose. If you're implementing a Janis Service, you should be using the add() method

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