<commit_before># bunyan-aws
Write buynan logs to Amazon Web Services CloudWatch.

## Install
`npm install bunyan-aws --save`

## Usage
````
var bunyan = require('bunyan');
var os = require('os');
var CloudWatchStream = require('bunyan-aws');
var myStream = new CloudWatchStream({
           logGroupName: 'MyApplicationLogs',
           logStreamName: 'MyStream-' + os.hostname(),
           cloudWatchOptions: {
               region: 'eu-central-1',
               sslEnabled: true
           }
       });
       
var log = bunyan.createLogger({
    name: 'logger',
    streams: [{
        stream: myStream,
        type: 'raw',
        level: 'info',
    }]
};       
       
````

## Configuration

### AWS Credentials
This package uses the AWS SDK to write the logs to CloudWatch. You must
set the AWS Credentials via one of the first three methods described here:
http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html

### Log Group
The log group must exist in CloudWatch. 
1. Sign into the AWS console
2. Click on CloudWatch found under Services > Management
3. Click on Logs
4. Select Actions > Create log group

### Log Stream
You may use an existing log stream. However if the stream is not found,
it will be created for you. The package assumes it is the only source
writing to the stream. **Errors will occur if other sources write to the
same stream.**
<commit_msg>Documentation<commit_after># bunyan-aws
Write buynan logs to Amazon Web Services CloudWatch.

## Install
`npm install bunyan-aws --save`

## Usage
````
var bunyan = require('bunyan');
var os = require('os');
var CloudWatchStream = require('bunyan-aws');
var myStream = new CloudWatchStream({
           logGroupName: 'MyApplicationLogs',
           logStreamName: 'MyStream-' + os.hostname(),
           cloudWatchOptions: {
               region: 'eu-central-1',
               sslEnabled: true
           }
       });
       
var log = bunyan.createLogger({
    name: 'logger',
    streams: [{
        stream: myStream,
        type: 'raw',
        level: 'info',
    }]
};       
       
````

## Configuration

### AWS Credentials
This package uses the AWS SDK to write the logs to CloudWatch. You must
set the AWS Credentials via one of the first three methods described here:
http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/node-configuring.html

### Log Group
The log group must exist in CloudWatch.

1. Sign into the AWS console
2. Click on CloudWatch found under Services > Management
3. Click on Logs
4. Select Actions > Create log group

### Log Stream
You may use an existing log stream. However if the stream is not found,
it will be created for you. The package assumes it is the only source
writing to the stream. **Errors will occur if other sources write to the
same stream.**

{'fraction_non_alphanumeric': 0.09742120343839542, 'fraction_numerical': 0.0035816618911174787, 'mean_word_length': 2.8737864077669903, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2664509', 'n_tokens_mistral': 798, 'n_tokens_neox': 763, 'n_words': 320}