-Parameterized elastic search logging to a const.
This commit is contained in:
parent
bb8525f69e
commit
78e26b2e6e
1 changed files with 3 additions and 2 deletions
|
@ -13,12 +13,13 @@ import fs from 'fs';
|
||||||
import fileExists from 'file-exists';
|
import fileExists from 'file-exists';
|
||||||
import * as util from '../../utils/importer/util';
|
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({
|
const eclient = new elasticsearch.Client({
|
||||||
host: 'http://localhost:9200',
|
host: 'http://localhost:9200',
|
||||||
|
|
||||||
log: {
|
log: {
|
||||||
level : 'info',
|
level : elasticsearchloglevel,
|
||||||
type : 'stream',
|
type : 'stream',
|
||||||
stream: loggerStream,
|
stream: loggerStream,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Reference in a new issue