我正在使用
如何让它不记录任何东西?
elasticsearch
npm模块。由于我的elasticsearch服务器当前关闭,我会收到烦人的黄色警告信息。如何让它不记录任何东西?
elasticsearch
npm模块。由于我的elasticsearch服务器当前关闭,我会收到烦人的黄色警告信息。var client = new elasticsearch.Client({
log : [{
type: 'stdio',
levels: ['error', 'warning'] // change these options
}]
});
所以,如果你只想要出现错误提示,那么就应该这样做。
var client = new elasticsearch.Client({
log : [{
type: 'stdio',
levels: ['error'] // change these options
}]
});
我来到这个线程是因为在我正在开发的Node.js应用程序中,每个Elasticsearch查询都会得到冗长的日志。
结果发现是一个名为elasticsearch-query-builder
的包。它寻找一个名为VERBOSE_LOG
的环境变量,我必须取消设置它(即不将其设置为false
,这是一个真值字符串值)。