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/controllers

View file

@ -1,10 +1,18 @@
import 'babel-polyfill';
import winston from 'winston';
import winstonStream from 'winston-stream';
import { sync, getStats } from '../utils/importer';
import elasticsearch from 'elasticsearch';
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,
},
});
function getSuggestions (input) {