@lambdatest/node-rest-client
Advanced tools
Comparing version 1.0.7 to 1.0.8
/** | ||
* logger for create logFile as lambda_api.log to current dir if path is not passed by User. | ||
*/ | ||
var winston = require("winston"); | ||
module.exports = function(logFile) { | ||
var winstonFormat = winston.format; | ||
return winston.createLogger({ | ||
level: "info", | ||
format: winstonFormat.combine( | ||
winstonFormat.timestamp(), | ||
winstonFormat.json() | ||
), | ||
transports: [new winston.transports.File({ filename: logFile ? logFile : "lambda_api.log" })] | ||
}); | ||
}; | ||
var winston = require("winston"); | ||
function logging(logFile){ | ||
var winstonFormat = winston.format; | ||
if (process.env.LT_API_LOG === "true"){ | ||
return winston.createLogger({ | ||
level: "info", | ||
format: winstonFormat.combine( | ||
winstonFormat.timestamp(), | ||
winstonFormat.json() | ||
), | ||
transports: [new winston.transports.File({ filename: logFile ? logFile : "lambda_api.log" })] | ||
}); | ||
} | ||
return winston.createLogger({ | ||
level: "info", | ||
silent:"true", | ||
format: winstonFormat.combine( | ||
winstonFormat.timestamp(), | ||
winstonFormat.json() | ||
), | ||
transports: [new winston.transports.Console()] | ||
}); | ||
}; | ||
module.exports = logging |
{ | ||
"name": "@lambdatest/node-rest-client", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "LambdaTest Rest Client for Node.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
38555
818
1