From ee6c6bda2c41e06a1bf5f35c52b20cea04f667b3 Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Sat, 24 Mar 2018 06:31:01 +0100 Subject: [PATCH] chore: lighten debug logging --- lib/workers/branch/index.js | 1 - lib/workers/branch/lock-files.js | 10 +++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/workers/branch/index.js b/lib/workers/branch/index.js index 693d6c4df7..4b91d0fa98 100644 --- a/lib/workers/branch/index.js +++ b/lib/workers/branch/index.js @@ -136,7 +136,6 @@ async function processBranch(branchConfig) { Object.assign(config, await getUpdatedPackageFiles(config)); if (config.updatedPackageFiles && config.updatedPackageFiles.length) { logger.debug( - { updatedPackageFiles: config.updatedPackageFiles }, `Updated ${config.updatedPackageFiles.length} package files` ); } else { diff --git a/lib/workers/branch/lock-files.js b/lib/workers/branch/lock-files.js index 007439e194..133139acf0 100644 --- a/lib/workers/branch/lock-files.js +++ b/lib/workers/branch/lock-files.js @@ -199,12 +199,16 @@ async function writeExistingFiles(config) { const npmFiles = config.packageFiles.filter(p => p.packageFile.endsWith('package.json') ); + logger.debug( + { packageFiles: npmFiles.map(n => n.packageFile) }, + 'Writing package.json files' + ); for (const packageFile of npmFiles) { const basedir = upath.join( config.tmpDir.path, path.dirname(packageFile.packageFile) ); - logger.debug(`Writing package.json to ${basedir}`); + logger.trace(`Writing package.json to ${basedir}`); // Massage the file to eliminate yarn errors const massagedFile = { ...packageFile.content }; if (massagedFile.name) { @@ -283,7 +287,7 @@ async function writeExistingFiles(config) { packageLock ); } else { - logger.debug(`Removing ${basedir}/package-lock.json`); + logger.trace(`Removing ${basedir}/package-lock.json`); await fs.remove(upath.join(basedir, 'package-lock.json')); } // istanbul ignore if @@ -305,7 +309,7 @@ async function writeExistingFiles(config) { const yarnLock = await platform.getFile(packageFile.yarnLock); await fs.outputFile(upath.join(basedir, 'yarn.lock'), yarnLock); } else { - logger.debug(`Removing ${basedir}/yarn.lock`); + logger.trace(`Removing ${basedir}/yarn.lock`); await fs.remove(upath.join(basedir, 'yarn.lock')); } // TODO: Update the below with this once https://github.com/pnpm/pnpm/issues/992 is fixed -- GitLab