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

misc(asset-saver): tweak output format of logAssets #5696

Merged
merged 1 commit into from
Jul 21, 2018
Merged

Conversation

paulirish
Copy link
Member

For slightly cleaner log retrieval from lightrider

Copy link
Collaborator

@patrickhulce patrickhulce left a comment

Choose a reason for hiding this comment

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

WFM!

const traceIter = traceJsonGenerator(passAssets.traceData);
let traceJson = '';
for (const trace of traceIter) {
traceJson += trace;
}
log.log(`trace-${passAssets.passName}.json`, traceJson);
// eslint-disable-next-line no-console
console.log(`loggedAsset %%% trace-${passAssets.passName}.json %%% ${traceJson}`);
Copy link
Collaborator

Choose a reason for hiding this comment

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

is there still the max console.log length problem or was that fixed?

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed. :) yay

@@ -326,13 +326,16 @@ async function saveAssets(artifacts, audits, pathWithBasename) {
async function logAssets(artifacts, audits) {
const allAssets = await prepareAssets(artifacts, audits);
allAssets.map(passAssets => {
log.log(`devtoolslog-${passAssets.passName}.json`, JSON.stringify(passAssets.devtoolsLog));
const dtlogdata=JSON.stringify(passAssets.devtoolsLog);
Copy link
Collaborator

Choose a reason for hiding this comment

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

spaces?

Copy link
Member Author

Choose a reason for hiding this comment

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

nah it's more straightforward without any extra whitespace

Copy link
Member

Choose a reason for hiding this comment

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

nah it's more straightforward without any extra whitespace

uh...wha?

Copy link
Member Author

Choose a reason for hiding this comment

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

OHHH i thought the suggestion was to add a spaceindent arg to stringify. :) 🤡

@paulirish paulirish merged commit 5579378 into master Jul 21, 2018
@paulirish paulirish deleted the logassets2 branch July 21, 2018 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants