Console.log should be removed for production builds #8
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
When running in prodcution, I would like othave a way to disable to console.log messages.
We are using a docker run script, and it is messing up the output for no reason.
File: latests.js
Output cod:
console.log('Needs latest SSL Root Certificate Authority data', latestFile);
module.exports = require('./ssl-root-cas');
generate(latestFile).then(function () {
console.info('\n');
console.info('##########################################################################################');
console.info('# #');
console.info('# Downloaded the latest Root Certificate Authorities. Restart your server to use them. #');
console.info('# #');
console.info('##########################################################################################');
console.info('\n');
}, function (e) {
console.warn('\n\n');
console.warn("Couldn't download the latest Root CAs, but it's not a big deal.");
console.warn('');
console.warn('Use "require('ssl-root-cas')" instead of "require('ssl-root-cas/latest')"');
console.warn('');
});
Potential djustment:
if (process.env.NODE_ENV !== "production") {
console.log("log here")
}
Or provide a small script to load the files before starting the application?