Skip to content

Commit

Permalink
Merge pull request #21 from Shivanshu-lambdatest/master
Browse files Browse the repository at this point in the history
Added Extra Logs
  • Loading branch information
Shivanshu-lambdatest authored Aug 15, 2022
2 parents cebc582 + 1bae9ba commit c586659
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 123 deletions.
2 changes: 2 additions & 0 deletions lib/tunnel.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ function Tunnel() {
}
// Configure logger
Config_(options, function(error, response) {
console.log("Current version of Node Tunnel: ", packageVersion)
if (error) {
throw new Error(error);
}
Expand Down Expand Up @@ -118,6 +119,7 @@ function Tunnel() {

// Configure looger
Config_(options, function(error, response) {
console.log("Current version of Node Tunnel: ", packageVersion)
if (error) {
throw new Error(error);
}
Expand Down
4 changes: 3 additions & 1 deletion lib/tunnel_binary.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ function TunnelBinary(httpTunnelConfig, options) {
fs.createReadStream(binaryPath)
.pipe(unzip.Extract({ path: destParentDir }))
.on('error', function(e) {
console.log("Error log ------> ", e);
logger.log(
conf['user'],
conf['key'],
Expand Down Expand Up @@ -185,7 +186,7 @@ function TunnelBinary(httpTunnelConfig, options) {
self.retryBinaryDownload_(conf, destParentDir, retries, binaryPath, fnCallback);
});
} catch (e) {
console.error('Got Error while downloading binary zip');
console.error('Got Error while downloading binary zip', e);
logger.log(conf['user'], conf['key'], { filename: __filename }, conf, {
message: 'Got Error while Extracting binary zip',
e: e
Expand Down Expand Up @@ -254,6 +255,7 @@ function TunnelBinary(httpTunnelConfig, options) {
fs.accessSync(path, mode);
return true;
} catch (e) {
console.log('Error checkPath ----->', e);
if (typeof fs.accessSync !== 'undefined') {
return false;
}
Expand Down
155 changes: 34 additions & 121 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lambdatest/node-tunnel",
"version": "3.0.8",
"version": "3.0.9",
"description": "Nodejs bindings for LambdaTest Tunnel",
"main": "index.js",
"repository": {
Expand Down

0 comments on commit c586659

Please sign in to comment.