From dedf4836418ce6ea6578ab876e0472a43f23e00b Mon Sep 17 00:00:00 2001 From: Jader Dias Date: Fri, 29 May 2015 11:45:56 +0200 Subject: [PATCH] When writing to a file, also write to process.stdout --- lib/log4node.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/log4node.js b/lib/log4node.js index 2129cd6..c21feaf 100644 --- a/lib/log4node.js +++ b/lib/log4node.js @@ -184,6 +184,9 @@ Log4Node.prototype.write = function(msg) { else { if (this.stream) { this.stream.write(msg + '\n'); + if (this.stream !== process.stdout) { + process.stdout.write(msg + '\n'); + } } else { if (process.connected) { process.send({log: msg, logger_id: this.id});