diff --git a/src/lib/message-handler.ts b/src/lib/message-handler.ts index 037382a..b293db0 100644 --- a/src/lib/message-handler.ts +++ b/src/lib/message-handler.ts @@ -1,11 +1,12 @@ import {WS2PMessageHandler} from 'duniter/app/modules/ws2p/lib/impl/WS2PMessageHandler' import {WS2PConnection} from 'duniter/app/modules/ws2p/lib/WS2PConnection' import {WS2PResponse} from 'duniter/app/modules/ws2p/lib/impl/WS2PResponse' +import {NewLogger} from 'duniter/app/lib/logger' export class MessageHandler implements WS2PMessageHandler { async answerToRequest(json: any, c: WS2PConnection): Promise { - console.log('Request from %s = %s', c.pubkey, JSON.stringify(json)) + NewLogger().info('Request from %s = %s', c.pubkey, JSON.stringify(json)) return {} } @@ -13,7 +14,7 @@ export class MessageHandler implements WS2PMessageHandler { * THAT'S THE CORE OF DWATCHER: tracing push messages */ async handlePushMessage(json: any, c: WS2PConnection): Promise { - console.log('Push from %s = %s', c.pubkey, JSON.stringify(json)) + NewLogger().info('Push from %s = %s', c.pubkey, JSON.stringify(json)) } } \ No newline at end of file