Adding logger wrapper.

Log backend messages to syslog.
fixes #135
This commit is contained in:
softsimon
2020-10-13 15:27:52 +07:00
parent cd710d1002
commit fae1347db2
15 changed files with 238 additions and 66 deletions

View File

@@ -1,5 +1,5 @@
const config = require('../../mempool-config.json');
import logger from '../logger';
import * as WebSocket from 'ws';
import { Block, TransactionExtended, WebsocketResponse, MempoolBlock, OptimizedStatistic } from '../interfaces';
import blocks from './blocks';
@@ -107,7 +107,7 @@ class WebsocketHandler {
client.send(JSON.stringify(response));
}
} catch (e) {
console.log(e);
logger.err(e);
}
});
});