Skip to content
This repository has been archived by the owner on Oct 12, 2023. It is now read-only.

Commit

Permalink
Added log stream name
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlie Briggs committed Jan 16, 2018
1 parent e43832d commit d252605
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -12,10 +12,10 @@ The logger's API is identical to that of pino with the following exceptions:

* The property `sourcetype: _json` is added to logs in production for Splunk compatibility.
* Lambda related environment variables are added by default:
* `AWS_EXECUTION_ENV`,
* `AWS_LAMBDA_FUNCTION_NAME`,
* `AWS_LAMBDA_FUNCTION_MEMORY_SIZE`,
* `AWS_LAMBDA_FUNCTION_VERSION`
* `AWS_EXECUTION_ENV`,
* `AWS_LAMBDA_FUNCTION_NAME`,
* `AWS_LAMBDA_FUNCTION_MEMORY_SIZE`,
* `AWS_LAMBDA_FUNCTION_VERSION`
* Defaults to ISO timestamp logging for splunk compatiblity. At the time of writing this incurs a 25% pino performance penalty.

### Pino properties
Expand Down
1 change: 1 addition & 0 deletions lib/logger.js
Expand Up @@ -56,6 +56,7 @@ const getMetaData = () => ({
functionName: process.env.AWS_LAMBDA_FUNCTION_NAME,
functionMemorySize: process.env.AWS_LAMBDA_FUNCTION_MEMORY_SIZE,
functionVersion: process.env.AWS_LAMBDA_FUNCTION_VERSION,
logStreamName: process.env.AWS_LAMBDA_LOG_STREAM_NAME,
}
: undefined,
});
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d252605

Please sign in to comment.