[Pkg-javascript-commits] [node-ain2] 71/102: Fixed exception on Solaris even when not using the file transport

Jonas Smedegaard js at moszumanska.debian.org
Tue Apr 29 11:59:50 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 e23741600b3acfc33e60a9caad5dcc6b448d1d45
Author: Carlos Lage <carlos.lage at livestream.com>
Date:   Mon Oct 1 18:51:21 2012 -0400

    Fixed exception on Solaris even when not using the file transport
---
 index.js | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/index.js b/index.js
index ab6129c..f912df5 100644
--- a/index.js
+++ b/index.js
@@ -78,14 +78,17 @@ var Transport = {
 
             case 'Linux':
                 logTarget = '/dev/log' ;
-                break ;
-
+                break ;           
             default:
-                throw new Error('Unknown OS Type: ' + require('os').type()) ;
-
+                logTarget = false ;
+                break ;
         }
 
         return function(message, severity) {
+            if (false === logTarget) {
+                throw new Error('Unknown OS Type: ' + require('os').type()) ;
+            }
+
             var client = dgram.createSocket('unix_dgram') ;
             var syslogMessage = this.composerFunction(message, severity);
             client.send(syslogMessage,

-- 
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