Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

merge new version 1.0.3

  • Loading branch information...
commit 7fa6f705a36901010a442ddcf1897643efee5e96 1 parent f1d550a
@schamane authored
View
19 Changelog.md
@@ -1,24 +1,9 @@
-## 1.1.4
+## 1.0.3
+* This will be last version with node 0.2, 0.4 and 0.6 support
* Cleaned all opened and not closed ScopeHandlers
-* Added new node-gyp build file. Next release will not support node-waf and node version < 0.8.x
-
-## 1.1.3
-
-* Added node 0.7.x support
-
-## 1.1.2
-
* Fix compiling on Darwin and Windows. Thanks to Vinay Pulim https://github.com/milewise
-## 1.1.1
-
-* Minor change to package to support 0.4 version
-
-## 1.1.0
-
-* Port to 0.5.7 Node version
-
## 1.0.2
* Fixed MAIL log facility
View
4 README.md
@@ -1,6 +1,6 @@
# Node-Syslog
-v1.1.4
+v1.0.3
This is an node module (add-on) to work with system log daemon on unix systems.
Module is tested with node.js v0.3.3 and metalog, syslog-ng 3.1.1.
@@ -8,7 +8,7 @@ Module is tested with node.js v0.3.3 and metalog, syslog-ng 3.1.1.
Read Wiki "setMask" page for more information about how to use "setMask" functionality.
-Current version is compatible to node 0.4.x and higher versions. For older nodejs versions please use node-syslog v1.0.2
+Current version is compatible to node 0.2.x and 0.6.x versions. For newer nodejs versions please use node-syslog v1.1.5 and higher.
Node-syslog doesn't support Darwin OS and MS Windows, but should work fine with this OSes.
View
11 binding.gyp
@@ -1,11 +0,0 @@
-{
- "targets": [
- {
- "target_name": "syslog",
- "sources": [ "syslog.cc" ],
- "cflags": [
- "-fPIC", "-Wall", "-std=c++0x"
- ]
- }
- ]
-}
View
6 node-syslog.h
@@ -1,8 +1,6 @@
#ifndef syslog_h
#define syslog_h
-#define NODE_AT_LEAST_6 (NODE_VERSION_AT_LEAST(0, 6, 0))
-
#include <node.h>
#include <node_object_wrap.h>
#include <node_version.h>
@@ -11,10 +9,6 @@
#include <stdlib.h>
#include <string.h>
-#if NODE_AT_LEAST_6
-#include <uv.h>
-#endif
-
namespace node {
View
2  node-syslog.js
@@ -11,7 +11,7 @@ init: SyslogWrapper.init,
log: SyslogWrapper.log,
setMask: SyslogWrapper.setMask,
close: SyslogWrapper.close,
-version: '1.1.4',
+version: '1.0.3',
/*
* facilities
View
4 package.json
@@ -1,12 +1,12 @@
{
"name": "node-syslog",
- "version": "1.1.4",
+ "version": "1.0.3",
"directories": {
"lib": "./lib"
},
"main": "./node-syslog",
"engines": {
- "node" : ">=0.4.0"
+ "node" : ">=0.4.0 < 0.7.0"
},
"description": "Node module to support sending messages to syslog daemon",
"author": "Nazar Kulyk <nasar.kulyk@googlemail.com>",
View
21 syslog.cc
@@ -4,7 +4,6 @@ using namespace v8;
using namespace node;
#define NODE_LESS_THAN_5 (!(NODE_VERSION_AT_LEAST(0, 5, 4)))
-#define NODE_LESS_THAN_6 (!(NODE_VERSION_AT_LEAST(0, 6, 0)))
Persistent<FunctionTemplate> Syslog::constructor_template;
bool Syslog::connected_ = false;
@@ -59,28 +58,19 @@ struct log_request {
uint32_t log_level;
};
-#if !NODE_LESS_THAN_6
-static void UV_AfterLog(uv_work_t *req) {
-#else
static int EIO_AfterLog( eio_req *req) {
-#endif
struct log_request *log_req = (struct log_request *)(req->data);
log_req->cb.Dispose(); // is this necessary?
free(log_req->msg);
free(log_req);
delete req;
-#if NODE_LESS_THAN_6
- ev_unref(EV_DEFAULT_UC);
-#endif
#if NODE_LESS_THAN_5
return 0;
#endif
}
-#if !NODE_LESS_THAN_6
-static void UV_Log(uv_work_t *req) {
-#elif !NODE_LESS_THAN_5
+#if !NODE_LESS_THAN_5
static void EIO_Log(eio_req *req) {
#else
static int EIO_Log(eio_req *req) {
@@ -89,9 +79,6 @@ static int EIO_Log(eio_req *req) {
char *msg = log_req->msg;
syslog(log_req->log_level, "%s", msg);
-#if NODE_LESS_THAN_6
- req->result = 0;
-#endif
#if NODE_LESS_THAN_5
return 0;
#else
@@ -124,14 +111,8 @@ Syslog::log ( const Arguments& args)
log_req->cb = Persistent<Function>::New(cb);
log_req->msg = strdup(*msg);
log_req->log_level = log_level;
-#if NODE_LESS_THAN_6
eio_custom(EIO_Log, EIO_PRI_DEFAULT, EIO_AfterLog, log_req);
ev_ref(EV_DEFAULT_UC);
-#else
- uv_work_t *work_req = new uv_work_t();
- work_req->data = log_req;
- uv_queue_work(uv_default_loop(), work_req, UV_Log, UV_AfterLog);
-#endif
return scope.Close(Undefined());
}
View
2  wscript
@@ -4,7 +4,7 @@ from os.path import exists
srcdir = '.'
blddir = 'build'
-VERSION = '1.1.4'
+VERSION = '1.0.3'
def set_options(opt):
opt.tool_options('compiler_cxx')
Please sign in to comment.
Something went wrong with that request. Please try again.