-
Notifications
You must be signed in to change notification settings - Fork 66
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
Noisy output when uploading logs to Stackdriver #668
Comments
@callmehiphop @bcoe Is that gRPC making all that noise? Is there a way to disable whatever it is? |
@sffc what environment are you running this script in, the detailed output looks like logging that one would enable via an environment variable -- I actually don't recognize the logging from our gRPC library, looks like it's potentially coming directly from an HTTP2 library. |
It's coming from Node.js HTTP2 stack: DEBUGF("deflatehd: emit table_size=%zu\n", table_size); From those sources, it seems like the #ifdef DEBUGBUILD
#define DEBUGF(...) nghttp2_debug_vprintf(__VA_ARGS__)
void nghttp2_debug_vprintf(const char *format, ...);
#else
#define DEBUGF(...) \
do { \
} while (0)
#endif So... the main question is, which version of Node.js do you use? Any chance it's a manually built version with debugging enabled, e.g. by using |
Thanks for the investigation! I use Node.js from the NodeSource Centos repository:
|
@sffc Thank you for confirming! Can you please run this small sample (adapted from here) with your Node binary and see if it prints those debug messages? (you can compare with an official Node.js binary) If it does, the problem should be reported to NodeSource. Thank you! const http2 = require('http2');
const client = http2.connect('https://www.google.com');
client.on('error', (err) => console.error(err));
const req = client.request({ ':path': '/' });
req.on('response', (headers, flags) => {
for (const name in headers) {
console.log(`${name}: ${headers[name]}`);
}
});
req.setEncoding('utf8');
let data = '';
req.on('data', (chunk) => { data += chunk; });
req.on('end', () => {
console.log(`\nReceived ${data.length} bytes of data.`);
client.close();
});
req.end(); |
Filed an upstream issue: nodesource/distributions#995 Thanks for helping diagnose the problem! |
When calling functions that upload logs to the server, like
.write()
, a large amount of lines get written to standard out. Example:I can't find a way to disable this noisy output. This is problematic because I need to control the standard out of my program.
Environment details
@google-cloud/logging
version: 6.0.0Steps to reproduce
Run the example code that creates a log entry and writes it to Stackdriver
The text was updated successfully, but these errors were encountered: