node-opcua-debug
Advanced tools
Comparing version 0.2.0 to 0.2.2
@@ -0,0 +0,0 @@ |
{ | ||
"name": "node-opcua-debug", | ||
"version": "0.2.0", | ||
"version": "0.2.2", | ||
"description": "pure nodejs OPCUA SDK - module -debug", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -0,0 +0,0 @@ function trace_from_this_projet_only(err) { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ function hexDump(buffer, width) { |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -0,0 +0,0 @@ "use strict"; |
@@ -27,2 +27,3 @@ "use strict"; | ||
//xx console.log(" log_file ",log_file); | ||
var f = fs.createWriteStream(log_file, {flags: 'w', encoding: "ascii"}); | ||
@@ -33,13 +34,9 @@ | ||
var msg = util.format.apply(null, arguments); | ||
f.write(msg + '\n'); | ||
if (process.env.DEBUG) { | ||
old_console_log.call(old_console_log, msg); | ||
old_console_log.call(console, msg); | ||
} | ||
} | ||
f.on('finish', function () { | ||
if (callback) { | ||
callback(); | ||
} | ||
}); | ||
@@ -59,17 +56,16 @@ if (!is_async) { | ||
console.log("redirectToFile has intercepted an error"); | ||
console.log("redirectToFile has intercepted an error :" , err); | ||
// we don't want the callback anymore since we got an error | ||
callback = function() { | ||
// display file on screen for insvestigation | ||
console.log(fs.readFileSync(log_file).toString("ascii")); | ||
// rethrow exception | ||
throw err; | ||
}; | ||
f.end(); | ||
// display file on screen for insvestigation | ||
console.log(fs.readFileSync(log_file).toString("ascii")); | ||
f.end(function() { | ||
callback(err); | ||
}); | ||
} | ||
console.log = old_console_log; | ||
f.end(callback); | ||
f.end(); | ||
} else { | ||
@@ -81,6 +77,11 @@ | ||
// async version | ||
action_func(function (err) { | ||
assert(callback); | ||
f.end(); | ||
console.log = old_console_log; | ||
if (err) { | ||
console.log("redirectToFile has intercepted an error"); | ||
throw err; | ||
} | ||
f.end(callback); | ||
}); | ||
@@ -87,0 +88,0 @@ } |
describe("",function(){ | ||
}); |
@@ -0,0 +0,0 @@ var dumpIf = require("..").dumpIf; |
@@ -0,0 +0,0 @@ "use strcit"; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
11831
278