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

kinene

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kinene - npm Package Compare versions

Comparing version 0.0.6 to 0.0.7

36

lib/services/kinene.js

@@ -62,3 +62,3 @@ 'use strict';

catch (err) {
this.localLog(['error', 'kinene', 'log'], err.message);
this.localLog(['error', 'kinene', 'log'], { error: err.message });
}

@@ -70,3 +70,3 @@ }

// 'data' is optional
this.server.log(tags, data);
this.server.log(tags, this.addTime(data));
}

@@ -81,8 +81,7 @@

logInfo = {
tags,
logInfo = this.formatLog({
...logInfo,
source: logInfo.source || LOGS_SOURCE,
isTest: testMode
};
});

@@ -133,7 +132,2 @@ try {

putTestRecords(...args) {
return this.kinesis.putTestRecords(...args);
}
// TODO in addition to this local 'append', it's worth sending this data to kinesis with some redacted info or something

@@ -161,13 +155,23 @@ async appendLocal({ id, msg }) {

formatRecord(record) {
formatLog(log) {
const { arrayIfy } = internals;
return {
...this.addTime(log),
tags: log.tags ? arrayIfy(log.tags) : []
};
}
addTime(log) {
const { localeStringCountry, localeStringTimezone, localeStringAbbrev } = this.options;
const { arrayIfy } = internals;
const now = new Date();
return {
...record,
tags: record.tags ? arrayIfy(record.tags) : [],
timestamp: record.timestamp || now.getTime(),
timestampReadable: record.timestampReadable || `${now.toLocaleString(localeStringCountry || 'en-US', { timeZone: localeStringTimezone || 'America/New_York' })} ${localeStringAbbrev || (localeStringTimezone ? '' : (this.isDstObserved ? 'EDT' : 'EST'))}`
...log,
timestamp: log.timestamp || now.getTime(),
timestampISO: now.toISOString(),
timestampReadable: log.timestampReadable || `${now.toLocaleString(localeStringCountry || 'en-US', { timeZone: localeStringTimezone || 'America/New_York' })} ${localeStringAbbrev || (localeStringTimezone ? '' : (this.isDstObserved ? 'EDT' : 'EST'))}`
};

@@ -174,0 +178,0 @@ }

{
"name": "kinene",
"version": "0.0.6",
"version": "0.0.7",
"description": "",

@@ -5,0 +5,0 @@ "author": "wswoodruff",

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