Skip to content

Commit

Permalink
Merge pull request #21 from miguel-a-calles-mba/feature/serverless-lo…
Browse files Browse the repository at this point in the history
…gging

Improved logging
  • Loading branch information
miguel-a-calles-mba committed May 29, 2020
2 parents 5e4e5c8 + d056329 commit 9ae2b9d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ class StackTerminationProtection {
* @param {...any} args
*/
log(...args) {
let output = 'serverless-stack-termination-protection: ';
let output = 'stack-termination-protection: ';
args.forEach((x) => {
output += ` ${(typeof(x) === 'object') ? JSON.stringify(x) : x}`;
});
console.log(output);
this.serverless.cli.log(output);
}

/**
Expand Down Expand Up @@ -69,8 +69,7 @@ class StackTerminationProtection {
.then((stackId) => this.log(
'Successfully',
`${isProtected ? 'en' : 'dis'}abled`,
'termination protection for stack',
stackId
'termination protection'
))
.catch((err) => this.log(
'Failed to update termination protection:',
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.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "serverless-stack-termination-protection",
"version": "1.0.2",
"version": "1.0.3",
"description": "Serverless plugin to update the CloudFormation stack termination protection",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 9ae2b9d

Please sign in to comment.