Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(CLI): Modern logs for invoke command #10052

Merged
merged 1 commit into from Oct 4, 2021

Conversation

pgrzesik
Copy link
Contributor

@pgrzesik pgrzesik commented Oct 4, 2021

Addresses: #9860

chalk.gray('--------------------------------------------------------------------')
);
writeText(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've decided to keep this separator in similar manner as it was in previous implementation

logResult.split('\n').forEach((line) => this.consoleLog(formatLambdaLogEvent(line)));
logResult.split('\n').forEach((line) => {
legacy.consoleLog(formatLambdaLogEvent(line));
writeText(formatLambdaLogEvent(line, { isModern: true }));
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've decided to follow the same formatting as sls logs uses here

@pgrzesik pgrzesik requested a review from medikoo October 4, 2021 15:32
@codecov
Copy link

codecov bot commented Oct 4, 2021

Codecov Report

Merging #10052 (c2e4ac7) into master (f8ad7bc) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #10052   +/-   ##
=======================================
  Coverage   85.75%   85.76%           
=======================================
  Files         333      333           
  Lines       13435    13443    +8     
=======================================
+ Hits        11521    11529    +8     
  Misses       1914     1914           
Impacted Files Coverage Δ
lib/plugins/aws/invoke.js 98.36% <100.00%> (+0.11%) ⬆️
lib/plugins/aws/provider.js 93.71% <0.00%> (ø)
lib/plugins/aws/package/compile/functions.js 94.38% <0.00%> (+0.03%) ⬆️
lib/plugins/aws/package/compile/layers.js 84.94% <0.00%> (+0.33%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f8ad7bc...c2e4ac7. Read the comment docs.

Copy link
Contributor

@medikoo medikoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great 👍

@pgrzesik pgrzesik merged commit 2af95c0 into master Oct 4, 2021
@pgrzesik pgrzesik deleted the modern-logs-for-invoke branch October 4, 2021 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants