[Pkg-javascript-commits] [node-ain2] 23/102: Explicitly fall back to original `console` object to log send failures

Jonas Smedegaard js at moszumanska.debian.org
Tue Apr 29 11:59:46 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository node-ain2.

commit 3e9cec36f11d0bd215eca2937cc68eb62bb7027b
Author: Mark Wubben <mark at novemberborn.net>
Date:   Tue Sep 13 14:20:23 2011 +0100

    Explicitly fall back to original `console` object to log send failures
---
 index.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/index.js b/index.js
index 35fed67..2606926 100644
--- a/index.js
+++ b/index.js
@@ -1,5 +1,6 @@
 var dgram = require('dgram');
 var Buffer = require('buffer').Buffer;
+var nodeConsole = console;
 
 var Facility = {
     kern:   0,
@@ -161,7 +162,7 @@ SysLogger.prototype._send = function(message, severity) {
                 this.hostname,
                 function(err) {
                   if(err){
-                    console.error('Cannot connect to %s:%d', this.hostname, this.port);
+                    nodeConsole.error('Cannot connect to %s:%d', this.hostname, this.port);
                   }
                 }
     );

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-ain2.git



More information about the Pkg-javascript-commits mailing list