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

syntex-logger

Package Overview
Dependencies
Maintainers
1
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

syntex-logger - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7-b1

51

main.js
let LanguageSwitcher = require('./language_manager');
const fs = require('fs');
const fs = require('fs'), path = require('path');
var logger, prefix, logDirectory, debugLevel = 'success';
const originalStderrWrite = process.stderr.write.bind(process.stderr);
process.stderr.write = (chunk, encoding, callback) => {
var reference, scriptPath, message = chunk;
if(chunk.includes('[') && chunk.includes('] '))
{
message = chunk.substring(chunk.split('] ')[0].length + 2);
}
if(message.includes('at '))
{
var p = message.split('at ')[1];
if(p.includes('\n'))
{
p = p.split('\n')[0];
}
if(p.includes('(') && p.includes(':'))
{
scriptPath = p.split('(')[1].split(':')[0];
}
var s = (p.match(/\//g) || []).length;
if(s > 0 && p.includes(':'))
{
p = p.split('/')[s];
reference = { script : p.split(':')[0], row : p.split(':')[1] };
}
}
if(logger != null && scriptPath != null && reference != null && scriptPath.includes(path.resolve(__dirname, '../..') + '/'))
{
logger.log('error', 'bridge', 'Bridge', message + ' ( [' + reference.script + '] %error[1]% [' + reference.row + '] )');
chuck = '';
}
return originalStderrWrite(chunk, encoding, callback);
};
module.exports = class Logger

@@ -100,7 +145,7 @@ {

if(error.stack != null && error.stack.split('at ')[1] != null)
if(error.stack != null && error.stack.includes('at '))
{
var p = error.stack.split('at ')[1];
if(p.split('\n')[0] != null)
if(p.includes('\n'))
{

@@ -107,0 +152,0 @@ p = p.split('\n')[0];

2

package.json
{
"name": "syntex-logger",
"version": "1.0.6",
"version": "1.0.7-b1",
"description": "A Basic Logging System",

@@ -5,0 +5,0 @@ "main": "main.js",

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