[enh] Add datetime infos on pushs
This commit is contained in:
@@ -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<WS2PResponse> {
|
||||
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<void> {
|
||||
console.log('Push from %s = %s', c.pubkey, JSON.stringify(json))
|
||||
NewLogger().info('Push from %s = %s', c.pubkey, JSON.stringify(json))
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user