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

@geek/logger

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@geek/logger - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

9

Logger.js

@@ -308,9 +308,14 @@ 'use strict';

const checkForError = params => {
// console.error(params instanceof Error);
if (params instanceof Error) {
// const result = JSON.parse(JSON.stringify(params));
// console.debug(`🦠 params=error: ${JSON.stringify(params, null, 2)}`);
const result = { ...params };
console.warn(result instanceof Error);
// console.warn(result instanceof Error);
result.stack_array = _.split(params.stack, '\n').filter(o => o);
result.error_message = params.message;
result.line = params.line;
result.column = params.column;
result.message = undefined;
// console.debug(result);
return result;

@@ -328,2 +333,4 @@ } else {

params = {};
} else {
params = checkForError(params);
}

@@ -330,0 +337,0 @@

4

package.json
{
"name": "@geek/logger",
"version": "1.0.2",
"version": "1.0.3",
"description": "Logging module for Node.js and Axway Titanium",

@@ -54,3 +54,3 @@ "main": "Logger.js",

"eslint-plugin-import": "^2.22.1",
"eslint-plugin-jsdoc": "^30.6.2",
"eslint-plugin-jsdoc": "^30.6.3",
"eslint-plugin-promise": "^4.2.1",

@@ -57,0 +57,0 @@ "fs-extra": "^9.0.1",

@@ -7,9 +7,11 @@

this.event = ({ message, level, ...args }) => {
this.event = (params = {}) => {
const result = Ti.Analytics.featureEvent(message, args);
params = { ...params };
delete params.stack_array;
const result = Ti.Analytics.featureEvent(params.message, params);
if (result === -1) {
console.warn(`🗓️ Ti.Analytics.featureEvent - Validation Error: ${message}`, args);
console.warn(`🗓️ Ti.Analytics.featureEvent - Validation Error: ${params.message}`, params);
} else if (result === -2) {
console.warn(`🗓️ Ti.Analytics.featureEvent - Validation Disabled: ${message}`, args);
console.warn(`🗓️ Ti.Analytics.featureEvent - Validation Disabled: ${params.message}`, params);
}

@@ -16,0 +18,0 @@ };

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