From 5fec3a5cc13c323f60cb10d1a4f38b81d278e107 Mon Sep 17 00:00:00 2001 From: Rafa de la Torre Date: Tue, 4 Jun 2019 14:37:04 +0200 Subject: [PATCH] Replace console.log with an event --- copy-to.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/copy-to.js b/copy-to.js index c7d268f..1fcd828 100644 --- a/copy-to.js +++ b/copy-to.js @@ -105,7 +105,7 @@ CopyStreamQuery.prototype._transform = function(chunk, enc, cb) { case code.ParameterStatus: case code.NoticeResponse: case code.NotificationResponse: - console.log("Got an interspersed message: " + message); + this.emit('warning', 'Got an interspersed message: ' + message); break; } offset += (length - Int32Len);