next.js icon indicating copy to clipboard operation
next.js copied to clipboard

Disable stdout clearing

Open mcmillion opened this issue 7 years ago • 12 comments

(There may be a way to do this currently, but after asking a few times on Spectrum and looking through the changes for adding Webpackbar I haven't found anything)

Is your feature request related to a problem? Please describe.

When running Next in something like docker-compose the refreshing output constantly clears and mangles the log output.

Describe the solution you'd like

I'd like a way to disable this so that log output is just a stream and not constantly rerendered.

Edit: This includes local development as well.

mcmillion avatar Mar 04 '19 16:03 mcmillion

@mcmillion what version of Next.js are you on? Is this problem still present on 8.0.3?

Timer avatar Mar 04 '19 17:03 Timer

🤔 For me, this behavior actually started after I went to version 8. Would love to have more control over logging altogether though.

Janpot avatar Mar 05 '19 17:03 Janpot

Yeah I'm currently on 8.0.0, so I'm not sure how trying 8.0.3 helps me unless it added some kind of configuration to disable this.

mcmillion avatar Mar 05 '19 20:03 mcmillion

I guess I should add that my original question was specifically in regards to local development. When running a dev environment in docker (or something like Foreman) that merges the log output from multiple processes/containers, Webpackbar seems to obliterate that output every time it runs.

mcmillion avatar Mar 05 '19 20:03 mcmillion

@Timer I actually just came here trying to figure out how to get this progressbar back. We switched from 8.0.0 to 8.0.3 and noticed the progressbar was gone. Is it possible to enable this based on an envvar we set perhaps? That way it can be enabled for developer machines, but disabled on CI?

It appears the progressbar was removed with a change released in 8.0.2. Rolling back to 8.0.1 brought it back. Switching to 8.0.2 removed it.

ellisio avatar Mar 05 '19 21:03 ellisio

8.0.3's output is different, but it still clears the log when rebuilding in dev

mcmillion avatar Mar 05 '19 23:03 mcmillion

Same issue. It clears almost all output. With webpackbar we don't have any issues before. Very clear interface, good readable. This new "profiler" removes a lot of debug informations. For example all info from Webpack are cleared. No Info in terminal from webpack-bundle-analyzer or inspectpack and so on.

radeno avatar Mar 12 '19 15:03 radeno

I experience the same issue when running Next.js in dev mode with Honcho (Python port of Foreman) alongside other processes.

Next.js clears the console every time it recompiles, and I cannot see log messages from my other processes that happened just before recompilation.

missing-log-messages

illarionvk avatar Mar 19 '19 17:03 illarionvk

I would also appreciate this feature.

Also (I'm not sure how related this is), was there a recent change that disabled the compilation time output? After upgrading to next8 I no longer get the Compiled successfully in x ms type logs in my console.

jaycenhorton avatar Mar 20 '19 01:03 jaycenhorton

As a workaround you can use yarn dev 2> next-errors.log. Alternately with yarn dev > next.log the error pipe is not redirected so you will see only see errors. Or log both with yarn dev 2>&1 > next.log

Yzrsah avatar Mar 20 '19 16:03 Yzrsah

+1 for this feature. A config option to disable this: https://github.com/zeit/next.js/blob/78bcfa07b2b3f495d7bf4d215b9f5442802fcdf6/packages/next/build/output/store.ts#L24-L27

zacksinclair avatar Mar 21 '19 20:03 zacksinclair

Please 👍 my PR ^ for exposure.

justinmchase avatar Mar 25 '19 21:03 justinmchase