Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
awslogs-stream
Advanced tools
Readme
#awslogs-stream
Stream to write logs to AWS CloudWatch.
This is actually a plain Node.js Writable object stream.
##Usage
var bunyan = require('bunyan');
var CloudWatchStream = require('awslogs-stream');
var stream = CloudWatchStream({
logGroupName: 'my-group',
logStreamName: 'my-stream',
cloudWatchLogsOptions: {
region: 'us-west-1'
},
processLogRecord: function(record) {
return {
message: JSON.stringify(record),
timestamp: 1*new Date(record.time)
}
}
});
var log = bunyan.createLogger({
name: 'foo',
streams: [
{
stream: stream,
type: 'raw'
}
]
});
##API
###CloudWatchStream(opts)
With opts
of:
logGroupName
(required)logStreamName
(required)cloudWatchLogsOptions
(optional): options passed to the AWS.CloudWatchLogs
constructorcloudWatchLogs
(optional): optional existing cloudwatchlogs clientprocessLogRecord
(optional): function to process log records to for cloudwatch (it should return object with 2 properties: message
to be string and timestamp
to be unix timestamp)bufferDuration
(optional, by default it is 5000 ms) timeout between writesOn write of the first log, the module creates the logGroup and logStream if necessary.
We use the aws-sdk to write the logs - the AWS credentials have therefore to be configured using environment variables (AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
).
CloudWatchLogs.putLogEvents
is the method we use to write logs##Contributors This project was created by Mirko Kiefer (@mirkokiefer) and almost rewritten by Denis Bardadym.
FAQs
Writable stream to publish logs to AWS CloudWatch Logs
The npm package awslogs-stream receives a total of 69 weekly downloads. As such, awslogs-stream popularity was classified as not popular.
We found that awslogs-stream demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.