New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@rettersoft/retter-log

Package Overview
Dependencies
Maintainers
4
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rettersoft/retter-log - npm Package Compare versions

Comparing version

to
1.1.0

13

dist/index.js

@@ -12,3 +12,3 @@ "use strict";

const origlog = console.log;
console.log = async function (...args) {
console.log = function (...args) {
const message = arguments[0];

@@ -20,2 +20,5 @@ if (Object.prototype.toString.call(message) === "[object Object]" && message.type && message.type.toLowerCase() === "retterlog") {

}
else if (!message.host) {
origlog("Please specify host information inside message");
}
else if (!EVENT_BUS) {

@@ -25,5 +28,6 @@ origlog("Please specify EVENT_BUS as environment variable");

else {
delete message.type;
messages.push(SNS.publish({
TopicArn: EVENT_BUS,
Message: JSON.stringify({ ...(message.log), timestamp: Date.now() }),
Message: JSON.stringify({ ...message }),
MessageAttributes: {

@@ -38,3 +42,2 @@ MessageType: {

}
origlog(message);
};

@@ -66,5 +69,3 @@ }

'beforeExit', 'uncaughtException', 'unhandledRejection',
'SIGHUP', 'SIGINT', 'SIGQUIT', 'SIGILL', 'SIGTRAP',
'SIGABRT', 'SIGBUS', 'SIGFPE', 'SIGUSR1', 'SIGSEGV',
'SIGUSR2', 'SIGTERM',
'SIGTERM',
].forEach(evt => process.on(evt, onExit));

@@ -10,3 +10,3 @@

const origlog = console.log;
console.log = async function(...args: any) {
console.log = function(...args: any) {

@@ -19,2 +19,5 @@ const message = arguments[0];

}
else if(!message.host){
origlog("Please specify host information inside message");
}
else if(!EVENT_BUS){

@@ -24,6 +27,7 @@ origlog("Please specify EVENT_BUS as environment variable");

else{
delete message.type;
messages.push(
SNS.publish({
TopicArn: EVENT_BUS,
Message: JSON.stringify({...(message.log), timestamp: Date.now()} ),
Message: JSON.stringify({...message} ),
MessageAttributes: {

@@ -39,3 +43,2 @@ MessageType: {

}
origlog(message);
};

@@ -72,6 +75,4 @@ }

'beforeExit', 'uncaughtException', 'unhandledRejection',
'SIGHUP', 'SIGINT', 'SIGQUIT', 'SIGILL', 'SIGTRAP',
'SIGABRT','SIGBUS', 'SIGFPE', 'SIGUSR1', 'SIGSEGV',
'SIGUSR2', 'SIGTERM',
'SIGTERM',
].forEach(evt => process.on(evt, onExit));
{
"name": "@rettersoft/retter-log",
"version": "1.0.0",
"version": "1.1.0",
"description": "Streams logs with certain format",

@@ -5,0 +5,0 @@ "main": "dist/index.js",