Skip to content

Commit 9ae2b9d

Browse files
Merge pull request #21 from miguel-a-calles-mba/feature/serverless-logging
Improved logging
2 parents 5e4e5c8 + d056329 commit 9ae2b9d

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ class StackTerminationProtection {
2929
* @param {...any} args
3030
*/
3131
log(...args) {
32-
let output = 'serverless-stack-termination-protection: ';
32+
let output = 'stack-termination-protection: ';
3333
args.forEach((x) => {
3434
output += ` ${(typeof(x) === 'object') ? JSON.stringify(x) : x}`;
3535
});
36-
console.log(output);
36+
this.serverless.cli.log(output);
3737
}
3838

3939
/**
@@ -69,8 +69,7 @@ class StackTerminationProtection {
6969
.then((stackId) => this.log(
7070
'Successfully',
7171
`${isProtected ? 'en' : 'dis'}abled`,
72-
'termination protection for stack',
73-
stackId
72+
'termination protection'
7473
))
7574
.catch((err) => this.log(
7675
'Failed to update termination protection:',

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "serverless-stack-termination-protection",
3-
"version": "1.0.2",
3+
"version": "1.0.3",
44
"description": "Serverless plugin to update the CloudFormation stack termination protection",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)