From 78e26b2e6e7ef66fd56ae52074ebe5a6cd4ff418 Mon Sep 17 00:00:00 2001 From: Mark Beamer Jr Date: Sat, 26 May 2018 22:49:29 -0400 Subject: [PATCH] -Parameterized elastic search logging to a const. --- server/utils/chainquery/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/utils/chainquery/index.js b/server/utils/chainquery/index.js index 756bbb7..05ae1ea 100644 --- a/server/utils/chainquery/index.js +++ b/server/utils/chainquery/index.js @@ -13,12 +13,13 @@ import fs from 'fs'; import fileExists from 'file-exists'; import * as util from '../../utils/importer/util'; -const loggerStream = winstonStream(winston, 'info'); +const elasticsearchloglevel = 'info'; +const loggerStream = winstonStream(winston, elasticsearchloglevel); const eclient = new elasticsearch.Client({ host: 'http://localhost:9200', log: { - level : 'info', + level : elasticsearchloglevel, type : 'stream', stream: loggerStream, },