diff --git a/lib/logger/cmd-serializer.js b/lib/logger/cmd-serializer.js new file mode 100644 index 0000000000000000000000000000000000000000..f3fd49fb49be97823f23258b0072fc4f9e680dbf --- /dev/null +++ b/lib/logger/cmd-serializer.js @@ -0,0 +1,6 @@ +module.exports = cmdSerializer; + +// istanbul ignore next +function cmdSerializer(cmd) { + return cmd.replace(/https:\/\/[^@]*@/g, 'https://**redacted**@'); +} diff --git a/lib/logger/index.js b/lib/logger/index.js index 47225db3719f5f69db15ad57bc35eabf0cb917fc..b0bfea56378deb83f077124a00b11b37b4d59357 100644 --- a/lib/logger/index.js +++ b/lib/logger/index.js @@ -3,15 +3,11 @@ const bunyan = require('bunyan'); const PrettyStdout = require('./pretty-stdout').RenovateStream; const configSerializer = require('./config-serializer'); const errSerializer = require('./err-serializer'); +const cmdSerializer = require('./cmd-serializer'); let bunyanLogger; let meta = {}; -// istanbul ignore next -function cmdSerializer(cmd) { - return cmd.replace(/https:\/\/[^@]*@/g, 'https://**redacted**@'); -} - function initLogger() { const stdout = { name: 'stdout',