-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Make output should filter through "info" and "warn" loglevels. #532
Comments
I suppose I should note that this is desirable as the current situation is making it difficult to build tools that correctly diagnose and alert me to production deployment errors. In particular, |
closing due to staleness, a pull request for this would be great though |
Is there no way to make My inkling is that Maybe the only option is to capture the output as this issue suggests and do different things with it. |
I can't recall which addon it was, a popular websockets library I think, that used to have a Otherwise I don't think it bothers any of us enough to pursue it. But as I said above, pull requests are welcome, but it'd have to not be too invasive (i.e. it's not the kind of feature we're going to take on a ton of risky new code for). |
Yeah, I'm not a fan of that method at all.
Looking at the code, I only see a couple usages of The first is a test, so we can ignore it. The second is the implementation that I presume actually calls python/gyp. Interestingly, it looks like there was an attempt at adding a Lines 169 to 171 in 3555ff4
The last two files with Lines 188 to 189 in 5d76938
Lines 344 to 345 in 3555ff4
Looking at those usages, neither sets the optional 3rd argument It should be easy enough to add something to those calls, but what do we pass to them? Currently, node-gyp seems to pass all the logging (and related verboseness) to the This does get a little bit more complicated when you think about changing the verboseness of If we had to pick just one log level to capture https://github.com/npm/npmlog/blob/541407008c509755255a4819606e7916d26a77f5/log.js#L296-L304 I'm thinking |
notice seems like a good choice to me, I have my npm set to Unless someone else speaks up here, I'd encourage you to pursue a pull request that pipes the output line by line through npmlog. I'm not sure what to do about stderr, maybe that needs to go to stdout.pipe(split2()).pipe(new Transform({
transform: (chunk, enc, cb) => {
log.notice(chunk.toString()); cb();
}
}) Unless you have a better idea (or the reality of the codebase makes that too tricky). Feel free to do a PR as a draft to start with to get feedback if you need it. |
Output from Make should be filtered into loglevels. That is, Make's stdout should be pushed to
log.info
and stderr should be pushed tolog.warn
. For example, for a small library I created:I would expect no output whatsoever from a successful build when the loglevel is set to warn.
Thanks!
The text was updated successfully, but these errors were encountered: