Skip to content

Commit 0337c8b

Browse files
committed
refactor: update logging methods for clarity
1 parent aa5b1ee commit 0337c8b

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

packages/serverless-offline-s3/src/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,16 @@ const defaultOptions = {
1515
const omitUndefined = omitBy(isUndefined);
1616

1717
class ServerlessOfflineS3 {
18-
constructor(serverless, cliOptions, { log }) {
18+
constructor(serverless, cliOptions, {log}) {
1919
this.cliOptions = null;
2020
this.options = null;
2121
this.s3 = null;
2222
this.lambda = null;
2323
this.serverless = null;
24-
this.log = log;
2524

2625
this.cliOptions = cliOptions;
2726
this.serverless = serverless;
27+
this.log = log;
2828

2929
this.hooks = {
3030
'offline:start:init': this.start.bind(this),
@@ -139,7 +139,7 @@ class ServerlessOfflineS3 {
139139
omitUndefined(this.cliOptions)
140140
);
141141

142-
this.log.debug('options:', this.options);
142+
this.log.debug('s3 options:', this.options);
143143
}
144144

145145
_getEvents() {

packages/serverless-offline-sqs/src/index.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ const defaultOptions = {
3030
const omitUndefined = omitBy(isUndefined);
3131

3232
class ServerlessOfflineSQS {
33-
constructor(serverless, cliOptions, { log }) {
33+
constructor(serverless, cliOptions, {log}) {
3434
this.cliOptions = null;
3535
this.options = null;
3636
this.sqs = null;
3737
this.lambda = null;
3838
this.serverless = null;
39-
this.log = log;
4039

4140
this.cliOptions = cliOptions;
4241
this.serverless = serverless;
42+
this.log = log;
4343

4444
this.hooks = {
4545
'offline:start:init': this.start.bind(this),
@@ -66,9 +66,7 @@ class ServerlessOfflineSQS {
6666

6767
await Promise.all(eventModules);
6868

69-
this.log.notice(
70-
`Starting Offline SQS at stage ${this.options.stage} (${this.options.region})`
71-
);
69+
this.log.notice(`Starting Offline SQS at stage ${this.options.stage} (${this.options.region})`);
7270
}
7371

7472
ready() {
@@ -154,7 +152,7 @@ class ServerlessOfflineSQS {
154152
omitUndefined(this.cliOptions)
155153
);
156154

157-
this.log.debug('options:', this.options);
155+
this.log.debug('sqs options:', this.options);
158156
}
159157

160158
_getEvents() {

packages/serverless-offline-sqs/src/sqs.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ class SQS {
2525
this.lambda = null;
2626
this.resources = null;
2727
this.options = null;
28-
this.log = log;
2928

3029
this.lambda = lambda;
3130
this.resources = resources;
3231
this.options = options;
32+
this.log = log;
3333

3434
this.client = new SQSClient(this.options);
3535

0 commit comments

Comments
 (0)