1.0.12 • Published 9 months ago

rupyy-logger v1.0.12

Weekly downloads
-
License
ISC
Repository
-
Last release
9 months ago

Rupyy Logger

Rupyy Logger is an npm package to store data to AWS CloudWatch Logs using aws-sdk latest version.

Installation

Install the package using npm:

npm i rupyy-logger

Usage

Before using the addLogs function, you need to set up the AWS credentials and log configuration. Here's an example of how to use the package:

const cloudwatchLogger = require('rupyy-logger');

// Set up your AWS CloudWatch configuration
const config = {
  logGroupName: 'YourLogGroupName',
  logStreamName: 'YourLogStreamName',
  awsRegion: 'YourAWSRegion',
  awsAccessKeyId:'YourAWSAccessKeyId',
  awsSecretKey:'YourAWSSecretKey'
};

// Your log data
const logData = {
  level: 'info / error',
  req_id: '12345', // Unique Id
  purpose: 'Some purpose for this log',
  context: 'Some context for this log',
  logData: {
    // Additional log data if needed
  },
};

// Call the addLogs function to log the data to AWS CloudWatch
try {
  cloudwatchLogger(config, logData);
} catch (error) {
  console.error('Error:', error.message);
}
1.0.12

9 months ago

1.0.11

9 months ago

1.0.10

9 months ago

1.0.9

9 months ago

1.0.8

9 months ago

1.0.7

9 months ago

1.0.6

9 months ago

1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago