Fixed logging for elastic

This commit is contained in:
Fillerino 2017-08-18 10:16:29 +02:00
parent eb4a0e0f37
commit d64cf79f5d
5 changed files with 28 additions and 5 deletions
server/utils/importer

View file

@ -3,10 +3,20 @@
*/
const bitcoin = require('bitcoin-promise');
const elasticsearch = require('elasticsearch');
var eclient = new elasticsearch.Client({
const winston = require('winston');
const winstonStream = require('winston-stream');
const loggerStream = winstonStream(winston, 'info');
const eclient = new elasticsearch.Client({
host: 'http://elastic:changeme@localhost:9200',
log : 'info',
log : {
level : 'info',
type : 'stream',
stream: loggerStream,
},
});
const client = new bitcoin.Client({
host : 'localhost',
port : 9245,