Skip to content
This repository has been archived by the owner on Jun 5, 2024. It is now read-only.

Commit

Permalink
🐛 Check existence of papertrail port in serverless.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
JakubMatejka committed Nov 29, 2017
1 parent 83f7981 commit 37f9363
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Serverless plugin for log delivery from CloudWatch Logs to Papertrail using a la
1. Install npm package: `yarn add @keboola/serverless-papertrail-logging --dev`
2. Add plugin to your `serverless.yml`:
```yaml
custom:
papertrail:
port: 1234

plugins:
- '@keboola/serverless-papertrail-logging'
```
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@keboola/serverless-papertrail-logging",
"version": "1.0.5",
"version": "1.0.6",
"description": "Serverless plugin for log delivery from CloudWatch Logs to Papertrail using a lambda function with log groups subscription",
"main": "src/index.js",
"repository": "https://github.com/keboola/serverless-papertrail-logging",
Expand Down
4 changes: 4 additions & 0 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ class PapertrailLogging {
'before:package:compileEvents': this.beforePackageCompileEvents.bind(this),
'after:deploy:deploy': this.afterDeployDeploy.bind(this),
};

if (!_.has(this.service, 'custom.papertrail.port')) {
throw new this.serverless.classes.Error('Configure Papertrail port in custom.papertrail.port of the serverless.yml');
}
}

static getFunctionName() {
Expand Down

0 comments on commit 37f9363

Please sign in to comment.