[Pkg-javascript-commits] [node-ain2] 13/102: make port configurable

Jonas Smedegaard js at moszumanska.debian.org
Tue Apr 29 11:59:45 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 1e75bad65dee5964280e4f0cf732d7830affd892
Author: Patrick Huesler <patrick.huesler at gmail.com>
Date:   Tue Aug 16 18:38:41 2011 +0200

    make port configurable
---
 index.js | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/index.js b/index.js
index 4e8e907..2976fd8 100644
--- a/index.js
+++ b/index.js
@@ -106,10 +106,11 @@ function SysLogger() {
  * @param {Facility|Number|String} By default is "user"
  * @param {String} hostname By default is "localhost"
  */
-SysLogger.prototype.set = function(tag, facility, hostname) {
+SysLogger.prototype.set = function(tag, facility, hostname, port) {
     this.setTag(tag);
     this.setFacility(facility);
     this.setHostname(hostname);
+    this.setPort(port);
     
     return this;
 };
@@ -129,6 +130,11 @@ SysLogger.prototype.setHostname = function(hostname) {
     return this;
 };
 
+SysLogger.prototype.setPort = function(port) {
+    this.port = port || 514;
+    return this;
+};
+
 /**
  * Get new instance of SysLogger. All arguments is similar as `set` 
  * @returns {SysLogger}
@@ -230,4 +236,4 @@ SysLogger.prototype.assert = function(expression) {
 
 var logger = new SysLogger();
 logger.set();
-module.exports = logger;
\ No newline at end of file
+module.exports = logger;

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