diff --git a/lib/utils/logDeprecation.js b/lib/utils/logDeprecation.js index 37289b407..ac0605c2d 100644 --- a/lib/utils/logDeprecation.js +++ b/lib/utils/logDeprecation.js @@ -25,6 +25,13 @@ const resolveDeprecatedByService = weakMemoizee(serviceConfig => { }); function writeDeprecation(code, message) { + const prefix = 'Serverless: '; + const messageLines = message.split('\n'); + const followingLinesPrefix = ' '.repeat(prefix.length); + for (let i = 1; i < messageLines.length; ++i) { + messageLines[i] = followingLinesPrefix + messageLines[i]; + } + message = messageLines.join('\n'); process.stdout.write( `Serverless: ${chalk.keyword('orange')(`Deprecation warning: ${message}`)}\n` );