Skip to content

Commit

Permalink
refactor(CLI): Modern logs for print command
Browse files Browse the repository at this point in the history
  • Loading branch information
pgrzesik committed Oct 1, 2021
1 parent f73062f commit 10a6032
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/plugins/print.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const jc = require('json-cycle');
const yaml = require('js-yaml');
const ServerlessError = require('../serverless-error');
const cliCommandsSchema = require('../cli/commands-schema');
const { writeText, legacy } = require('@serverless/utils/log');

class Print {
constructor(serverless, options) {
Expand Down Expand Up @@ -126,7 +127,8 @@ class Print {
throw new ServerlessError('Format must be "yaml", "json" or "text"', 'PRINT_INVALID_FORMAT');
}

this.serverless.cli.consoleLog(out);
legacy.consoleLog(out);
writeText(out);
}
}

Expand Down

0 comments on commit 10a6032

Please sign in to comment.