Skip to content

Commit

Permalink
refactor(CLI): Modern logs for slstats command
Browse files Browse the repository at this point in the history
  • Loading branch information
pgrzesik committed Oct 4, 2021
1 parent 2027f13 commit 0c9dae1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/plugins/slstats.js
Expand Up @@ -2,6 +2,7 @@

const config = require('@serverless/utils/config');
const cliCommandsSchema = require('../cli/commands-schema');
const { legacy, log } = require('@serverless/utils/log');

class SlStats {
constructor(serverless, options) {
Expand All @@ -25,11 +26,13 @@ class SlStats {
if (enableStats) {
// set .serverlessrc config
config.set('trackingDisabled', false);
this.serverless.cli.log('Stats successfully enabled');
legacy.log('Stats successfully enabled');
log.notice.success('Stats successfully enabled');
} else if (disabledStats) {
// set .serverlessrc config
config.set('trackingDisabled', true);
this.serverless.cli.log('Stats successfully disabled');
legacy.log('Stats successfully disabled');
log.notice.success('Stats successfully disabled');
}
}
}
Expand Down

0 comments on commit 0c9dae1

Please sign in to comment.