在MacOS上抑制node-gyp日志消息

时间:2018-03-28 09:20:08

标签: node.js macos logging couchbase node-gyp

我正在尝试使用couchbase安装npm。我安装了最新版本的node(v9.6.1)和npm(5.8.0)。看来预构建的二进制文件不适用于我的环境。所以它试图在本地构建二进制文件。

npm install期间,我看到很多消息,如下所示:

prebuild-install || node-gyp rebuild

prebuild-install info begin Prebuild-install version 2.3.0
prebuild-install info looking for local prebuild @ prebuilds/couchbase-v2.4.3-node-v59-darwin-x64.tar.gz
prebuild-install info looking for cached prebuild @ /Users/XXXXXX/.npm/_prebuilds/https-github.com-couchbase-couchnode-releases-download-v2.4.3-couchbase-v2.4.3-node-v59-darwin-x64.tar.gz
prebuild-install http request GET https://github.com/couchbase/couchnode/releases/download/v2.4.3/couchbase-v2.4.3-node-v59-darwin-x64.tar.gz
prebuild-install http 404 https://github.com/couchbase/couchnode/releases/download/v2.4.3/couchbase-v2.4.3-node-v59-darwin-x64.tar.gz
prebuild-install WARN install No prebuilt binaries found (target=9.6.1 runtime=node arch=x64 platform=darwin)
  COPY ../deps/lcb/include/libcouchbase/libuv_io_opts.h
  COPY ../deps/lcb/include/libcouchbase/plugins/io/libuv/plugin-libuv.c
  COPY ../deps/lcb/include/libcouchbase/plugins/io/libuv/plugin-internal.h
  COPY ../deps/lcb/include/libcouchbase/plugins/io/libuv/libuv_compat.h
  CXX(target) Release/obj.target/couchbase/deps/lcb/src/bucketconfig/bc_cccp.o
  CXX(target) Release/obj.target/couchbase/deps/lcb/src/bucketconfig/bc_file.o
  CXX(target) Release/obj.target/couchbase/deps/lcb/src/bucketconfig/bc_http.o
  CXX(target) Release/obj.target/couchbase/deps/lcb/src/bucketconfig/bc_static.o
  CXX(target) Release/obj.target/couchbase/deps/lcb/src/bucketconfig/confmon.o
  CXX(target) Release/obj.target/couchbase/deps/lcb/src/http/http.o

  ../deps/lcb/src/http/http.cc:219:27: warning: suggest braces around initialization of subobject [-Wmissing-braces]
lcb_host_t reqhost = {0};
                      ^
                      {}
1 warning generated.
  CXX(target) Release/obj.target/couchbase/deps/lcb/src/http/http_io.o
  CXX(target) Release/obj.target/couchbase/deps/lcb/src/jsparse/parser.o
  CXX(target) Release/obj.target/couchbase/deps/lcb/src/lcbht/lcbht.o
  CXX(target) Release/obj.target/couchbase/deps/lcb/src/lcbio/connect.o
  CC(target) Release/obj.target/couchbase/deps/lcb/src/lcbio/ctx.o
  CC(target) Release/obj.target/couchbase/deps/lcb/src/lcbio/iotable.o
  CXX(target) Release/obj.target/couchbase/deps/lcb/src/lcbio/ioutils.o
  CXX(target) Release/obj.target/couchbase/deps/lcb/src/lcbio/manager.o

我假设这些日志来自node-gyp rebuild执行。

有没有办法抑制这些日志?我们可以为log-level设置node-gyp吗?

0 个答案:

没有答案