logs: improve logging

This commit is contained in:
Rhys Arkins 2021-02-24 15:18:43 +01:00
parent 566f64cea0
commit e9297944ab
3 changed files with 11 additions and 6 deletions

View file

@ -429,7 +429,7 @@ export async function getAdditionalFiles(
return { artifactErrors, updatedArtifacts };
}
const dirs = determineLockFileDirs(config, packageFiles);
logger.debug({ dirs }, 'lock file dirs');
logger.trace({ dirs }, 'lock file dirs');
await writeExistingFiles(config, packageFiles);
await writeUpdatedPackageFiles(config);

View file

@ -19,10 +19,9 @@ export async function getUpdatedPackageFiles(
config: BranchConfig
): Promise<PackageFilesResult> {
logger.trace({ config });
const { branchName, reuseExistingBranch } = config;
const { reuseExistingBranch } = config;
logger.debug(
{ reuseExistingBranch, branchName },
'manager.getUpdatedPackageFiles()'
`manager.getUpdatedPackageFiles() reuseExistinbranch=${reuseExistingBranch}`
);
const updatedFileContents: Record<string, string> = {};
const nonUpdatedFileContents: Record<string, string> = {};
@ -134,7 +133,7 @@ export async function getUpdatedPackageFiles(
reuseExistingBranch: false,
});
}
logger.debug({ packageFile, depName }, 'Updating packageFile content');
logger.debug(`Updating ${depName} in ${packageFile}`);
updatedFileContents[packageFile] = newContent;
}
if (newContent === existingContent) {

View file

@ -99,7 +99,13 @@ export async function pruneStaleBranches(
logger.debug('No renovate branches found');
return;
}
logger.debug({ branchList, renovateBranches }, 'Branch lists');
logger.debug(
{
branchList: branchList?.sort(),
renovateBranches: renovateBranches?.sort(),
},
'Branch lists'
);
const lockFileBranch = `${config.branchPrefix}lock-file-maintenance`;
renovateBranches = renovateBranches.filter(
(branch) => branch !== lockFileBranch