我想在我的Ruby应用程序上禁用NewRelic日志,但仅限于function* getRandomNumbers() {
for(let num;num !==8;){
num = Math.floor((Math.random() * 9) + 1);
yield num;
}
}
let text= [...getRandomNumbers()].join(' ');
console.log(text);
环境。
因为在文档中我们只设置了日志级别,并且我想避免任何日志记录,我可以使用任何选项来禁用它们吗?
这是我的test
:
newrelic.yml
答案 0 :(得分:4)
经过一番阅读后,我发现了这篇文章:https://discuss.newrelic.com/t/stop-logging-in-newrelic-agent-log-file/39876/3
我已经调整了yaml
的代码并以:
test:
<<: *default_settings
# It doesn't make sense to report to New Relic from automated test runs.
monitor_mode: false
logging:
enabled: false
现在问题解决了!
答案 1 :(得分:1)