-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Conversation
There was a problem hiding this 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}`); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spaces?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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. :) 🤡
For slightly cleaner log retrieval from lightrider