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

winston-cloudwatch

Package Overview
Dependencies
Maintainers
1
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

winston-cloudwatch - npm Package Compare versions

Comparing version 0.1.3 to 0.2.0

12

lib/cloudwatch-integration.js

@@ -6,3 +6,4 @@ var AWS = require('aws-sdk'),

logGroupName = '',
logStreamName = '';
logStreamName = '',
intervalId;

@@ -33,2 +34,7 @@ module.exports.init = function(awsLogGroupName, awsLogStreamName, awsAccessKeyId, awsSecretKey, awsRegion) {

};
if (logEvents.length <= 0) {
return;
}
cloudwatchlogs.putLogEvents(payload, function(err, data) {

@@ -41,3 +47,5 @@ if (err) return console.log(err, err.stack);

}
setInterval(upload, 1000);
if (!intervalId) {
intervalId = setInterval(upload, 1000);
}
};

@@ -44,0 +52,0 @@

2

package.json
{
"name": "winston-cloudwatch",
"version": "0.1.3",
"version": "0.2.0",
"description": "Send logs to Amazon Cloudwatch using Winston.",

@@ -5,0 +5,0 @@ "keywords": ["amazon", "cloudwatch", "winston", "logging", "log"],

var winston = require('winston'),
options = {
logGroupName: 'testing',
logStreamName: 'testing',
awsAccessKeyId: 'your-access-key-id',
awsSecretKey: 'your-secret-key'
};
winston.add(require('winston-cloudwatch'), options);
// aws keys are optional
options = {
logGroupName: 'testing',
logStreamName: 'testing',
awsAccessKeyId: 'your-access-key-id',
awsSecretKey: 'your-secret-key'
};
winston.add(require('../index'), options);
winston.silly('log this 1', { and: 'this too 1' });
winston.debug('log this 2', { and: 'this too 2' });
winston.verbose('log this 3', { and: 'this too 3' });
winston.info('log this 4', { and: 'this too 4' });
winston.warn('log this 5', { and: 'this too 5' });
winston.error('log this 6', { and: 'this too 6' });
winston.silly('silly', { and: 'this too 1' });
winston.debug('debug', { and: 'this too 2' });
winston.verbose('verbose', { and: 'this too 3' });
winston.info('info', { and: 'this too 4' });
winston.warn('warn', { and: 'this too 5' });
winston.error('error', { and: 'this too 6' });
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