Fixed logging for elastic
This commit is contained in:
parent
eb4a0e0f37
commit
d64cf79f5d
5 changed files with 28 additions and 5 deletions
server/utils/importer
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue