diff --git a/lib/config/decrypt.ts b/lib/config/decrypt.ts index bdf53b7002adcdfa4101fdbe262e0371c516df52..1525926b287177fb28163b887bb88060c8111190 100644 --- a/lib/config/decrypt.ts +++ b/lib/config/decrypt.ts @@ -22,7 +22,7 @@ export function decryptConfig( decryptedStr = crypto .privateDecrypt(privateKey, Buffer.from(eVal, 'base64')) .toString(); - logger.info('Decrypted config using default padding'); + logger.debug('Decrypted config using default padding'); } catch (err) { logger.debug('Trying RSA_PKCS1_PADDING for ' + eKey); decryptedStr = crypto @@ -40,10 +40,10 @@ export function decryptConfig( if (!decryptedStr.length) { throw new Error('empty string'); } - logger.info(`Decrypted ${eKey}`); + logger.debug(`Decrypted ${eKey}`); if (eKey === 'npmToken') { const token = decryptedStr.replace(/\n$/, ''); - logger.info( + logger.debug( { decryptedToken: maskToken(token) }, 'Migrating npmToken to npmrc' ); diff --git a/lib/config/migrate-validate.ts b/lib/config/migrate-validate.ts index 7ba8c83ee275f2df663f877a5a46f489d01bade4..53fb45e994bd3a7924ffda7a3e7460cffb4d9fde 100644 --- a/lib/config/migrate-validate.ts +++ b/lib/config/migrate-validate.ts @@ -13,7 +13,7 @@ export async function migrateAndValidate( try { const { isMigrated, migratedConfig } = configMigration.migrateConfig(input); if (isMigrated) { - logger.info( + logger.debug( { oldConfig: input, newConfig: migratedConfig }, 'Config migration necessary' ); diff --git a/lib/config/presets.ts b/lib/config/presets.ts index e41361ed81a088147b64447f4b9f32299b64da27..916bc1f9faad48f1d2e908a9c735b916c5f8f486 100644 --- a/lib/config/presets.ts +++ b/lib/config/presets.ts @@ -166,10 +166,10 @@ export async function resolveConfigPresets( for (const preset of inputConfig.extends) { // istanbul ignore if if (existingPresets.includes(preset)) { - logger.info(`Already seen preset ${preset} in ${existingPresets}`); + logger.debug(`Already seen preset ${preset} in ${existingPresets}`); } else if (ignorePresets.includes(preset)) { // istanbul ignore next - logger.info(`Ignoring preset ${preset} in ${existingPresets}`); + logger.debug(`Ignoring preset ${preset} in ${existingPresets}`); } else { logger.trace(`Resolving preset "${preset}"`); let fetchedPreset; diff --git a/lib/datasource/ansible-galaxy/index.ts b/lib/datasource/ansible-galaxy/index.ts index ccc5915fc1cd73d54d32e8d634c1ea0827aa13ce..42223a369e8f3a4d099566befe10bb31c0421033 100644 --- a/lib/datasource/ansible-galaxy/index.ts +++ b/lib/datasource/ansible-galaxy/index.ts @@ -96,7 +96,7 @@ export async function getPkgReleases({ return result; } catch (err) { if (err.statusCode === 404 || err.code === 'ENOTFOUND') { - logger.info({ lookupName }, `Dependency lookup failure: not found`); + logger.debug({ lookupName }, `Dependency lookup failure: not found`); return null; } logger.warn( diff --git a/lib/datasource/cargo/index.ts b/lib/datasource/cargo/index.ts index 8dcc7df8fa12550c3fe36cecb9c254b465a038ba..8af33738cea652f63c1996a19befc5839ba401b8 100644 --- a/lib/datasource/cargo/index.ts +++ b/lib/datasource/cargo/index.ts @@ -99,7 +99,7 @@ export async function getPkgReleases({ return result; } catch (err) { if (err.statusCode === 404 || err.code === 'ENOTFOUND') { - logger.info({ lookupName }, `Dependency lookup failure: not found`); + logger.debug({ lookupName }, `Dependency lookup failure: not found`); logger.debug({ err }, 'Crate lookup error'); return null; } diff --git a/lib/datasource/dart/index.ts b/lib/datasource/dart/index.ts index 5c585720da3f4210b49fa61f87e6c506c9b752b0..24776a8991feae994158949482f368237ae4ba29 100644 --- a/lib/datasource/dart/index.ts +++ b/lib/datasource/dart/index.ts @@ -25,7 +25,7 @@ export async function getPkgReleases({ }); } catch (err) { if (err.statusCode === 404 || err.code === 'ENOTFOUND') { - logger.info({ lookupName }, `Dependency lookup failure: not found`); + logger.debug({ lookupName }, `Dependency lookup failure: not found`); logger.debug({ err }, 'Dart lookup error'); return null; } diff --git a/lib/datasource/docker/index.ts b/lib/datasource/docker/index.ts index e7e96a36ed853b60857ac5d757c5bdbf20142894..9396fad45482e194e93ce1972ea6ceee19e864f4 100644 --- a/lib/datasource/docker/index.ts +++ b/lib/datasource/docker/index.ts @@ -73,7 +73,7 @@ function getECRAuthToken( ecr.getAuthorizationToken({}, (err, data) => { if (err) { logger.trace({ err }, 'err'); - logger.info('ECR getAuthorizationToken error'); + logger.debug('ECR getAuthorizationToken error'); resolve(null); } else { const authorizationToken = @@ -151,7 +151,7 @@ async function getAuthHeaders( }; } catch (err) /* istanbul ignore next */ { if (err.statusCode === 401) { - logger.info( + logger.debug( { registry, dockerRepository: repository }, 'Unauthorized docker lookup' ); @@ -159,7 +159,7 @@ async function getAuthHeaders( return null; } if (err.statusCode === 403) { - logger.info( + logger.debug( { registry, dockerRepository: repository }, 'Not allowed to access docker registry' ); @@ -203,7 +203,7 @@ async function getManifestResponse( try { const headers = await getAuthHeaders(registry, repository); if (!headers) { - logger.info('No docker auth found - returning'); + logger.debug('No docker auth found - returning'); return null; } headers.accept = 'application/vnd.docker.distribution.manifest.v2+json'; @@ -217,7 +217,7 @@ async function getManifestResponse( throw err; } if (err.statusCode === 401) { - logger.info( + logger.debug( { registry, dockerRepository: repository }, 'Unauthorized docker lookup' ); @@ -225,7 +225,7 @@ async function getManifestResponse( return null; } if (err.statusCode === 404) { - logger.info( + logger.debug( { err, registry, @@ -243,14 +243,14 @@ async function getManifestResponse( throw new DatasourceError(err); } if (err.code === 'ETIMEDOUT') { - logger.info( + logger.debug( { registry }, 'Timeout when attempting to connect to docker registry' ); logger.debug({ err }); return null; } - logger.info( + logger.debug( { err, registry, @@ -307,7 +307,7 @@ export async function getDigest( if (err instanceof DatasourceError) { throw err; } - logger.info( + logger.debug( { err, lookupName, @@ -369,13 +369,13 @@ async function getTags( 'docker.getTags() error' ); if (err.statusCode === 404 && !repository.includes('/')) { - logger.info( + logger.debug( `Retrying Tags for ${registry}/${repository} using library/ prefix` ); return getTags(registry, 'library/' + repository); } if (err.statusCode === 401 || err.statusCode === 403) { - logger.info( + logger.debug( { registry, dockerRepository: repository, err }, 'Not authorised to look up docker tags' ); @@ -396,7 +396,7 @@ async function getTags( throw new DatasourceError(err); } if (err.code === 'ETIMEDOUT') { - logger.info( + logger.debug( { registry }, 'Timeout when attempting to connect to docker registry' ); @@ -481,7 +481,7 @@ async function getLabels( // This means that the latest tag doesn't have a manifest, which shouldn't // be possible if (!manifestResponse) { - logger.info( + logger.debug( { registry, dockerRepository: repository, @@ -504,7 +504,7 @@ async function getLabels( const configDigest = manifest.config.digest; const headers = await getAuthHeaders(registry, repository); if (!headers) { - logger.info('No docker auth found - returning'); + logger.debug('No docker auth found - returning'); return {}; } const url = `${registry}/v2/${repository}/blobs/${configDigest}`; @@ -527,7 +527,7 @@ async function getLabels( throw err; } if (err.statusCode === 401) { - logger.info( + logger.debug( { registry, dockerRepository: repository }, 'Unauthorized docker lookup' ); @@ -555,7 +555,7 @@ async function getLabels( 'docker registry failure: internal error' ); } else if (err.code === 'ETIMEDOUT') { - logger.info( + logger.debug( { registry }, 'Timeout when attempting to connect to docker registry' ); diff --git a/lib/datasource/github/index.ts b/lib/datasource/github/index.ts index 5ed65e172314f6ff1afcb7853181ba44c2564432..c72d5c07198d96706ccb99bbb1b7c30a9f5cd80c 100644 --- a/lib/datasource/github/index.ts +++ b/lib/datasource/github/index.ts @@ -58,7 +58,7 @@ export async function getPreset( throw err; } if (err.message === 'dep not found') { - logger.info('default.json preset not found - trying renovate.json'); + logger.debug('default.json preset not found - trying renovate.json'); return fetchJSONFile(pkgName, 'renovate.json'); } throw err; @@ -96,7 +96,7 @@ async function getTagCommit( logger.warn({ res }, 'Unknown git tag refs type'); } } catch (err) { - logger.info( + logger.debug( { githubRepo, err }, 'Error getting tag commit from GitHub repo' ); @@ -141,7 +141,7 @@ export async function getDigest( const url = `https://api.github.com/repos/${githubRepo}/commits?per_page=1`; digest = (await ghGot(url)).body[0].sha; } catch (err) { - logger.info( + logger.debug( { githubRepo, err }, 'Error getting latest commit from GitHub repo' ); @@ -208,7 +208,7 @@ export async function getPkgReleases({ ).body.map(o => o.name); } } catch (err) { - logger.info({ repo, err }, 'Error retrieving from github'); + logger.debug({ repo, err }, 'Error retrieving from github'); } if (!versions) { return null; diff --git a/lib/datasource/gitlab/index.ts b/lib/datasource/gitlab/index.ts index 3515415cf7f6f29e26e9100f3b5d76ef3aceb82d..607719c41c74cf2c56c36b7e576be89661888636 100644 --- a/lib/datasource/gitlab/index.ts +++ b/lib/datasource/gitlab/index.ts @@ -57,7 +57,7 @@ export async function getPreset( try { return JSON.parse(res); } catch (err) /* istanbul ignore next */ { - logger.info('Failed to parse renovate.json'); + logger.debug('Failed to parse renovate.json'); throw new Error('invalid preset JSON'); } } @@ -120,7 +120,7 @@ export async function getPkgReleases({ } } catch (err) { // istanbul ignore next - logger.info({ repo, err }, 'Error retrieving from Gitlab'); + logger.debug({ repo, err }, 'Error retrieving from Gitlab'); } // istanbul ignore if diff --git a/lib/datasource/go/index.ts b/lib/datasource/go/index.ts index e1602c1cd420550192c5e01aa6886e7c82f48c26..eba3d02fce7d5a5e514d51b53382106d51e69484 100644 --- a/lib/datasource/go/index.ts +++ b/lib/datasource/go/index.ts @@ -56,13 +56,16 @@ async function getDatasource(name: string): Promise<DataSource | null> { return null; } catch (err) { if (err.statusCode === 404 || err.code === 'ENOTFOUND') { - logger.info({ dependency: name }, `Dependency lookup failure: not found`); + logger.debug( + { dependency: name }, + `Dependency lookup failure: not found` + ); logger.debug({ err, }); return null; } - logger.info({ err, name }, 'go lookup failure: Unknown error'); + logger.debug({ err, name }, 'go lookup failure: Unknown error'); return null; } } diff --git a/lib/datasource/helm/index.ts b/lib/datasource/helm/index.ts index 6fc18ec3375d872fc13f89174f433808f0c83165..8de3f45c02a423af717cef42a5d8e7e405d20eed 100644 --- a/lib/datasource/helm/index.ts +++ b/lib/datasource/helm/index.ts @@ -23,7 +23,7 @@ export async function getRepositoryData( } catch (err) { // istanbul ignore if if (err.code === 'ERR_INVALID_URL') { - logger.info( + logger.debug( { helmRepository: repository }, 'helm repository is not a valid URL - skipping' ); @@ -31,7 +31,7 @@ export async function getRepositoryData( } // istanbul ignore if if (err.code === 'ENOTFOUND' || err.code === 'EAI_AGAIN') { - logger.info({ err }, 'Could not connect to helm repository'); + logger.debug({ err }, 'Could not connect to helm repository'); return null; } if (err.statusCode === 404 || err.code === 'ENOTFOUND') { @@ -46,7 +46,7 @@ export async function getRepositoryData( } // istanbul ignore if if (err.name === 'UnsupportedProtocolError') { - logger.info({ repository }, 'Unsupported protocol'); + logger.debug({ repository }, 'Unsupported protocol'); return null; } logger.warn( @@ -96,7 +96,7 @@ export async function getPkgReleases({ } const repositoryData = await getRepositoryData(helmRepository); if (!repositoryData) { - logger.info(`Couldn't get index.yaml file from ${helmRepository}`); + logger.debug(`Couldn't get index.yaml file from ${helmRepository}`); return null; } const releases = repositoryData.find(chart => chart.name === lookupName); diff --git a/lib/datasource/hex/index.ts b/lib/datasource/hex/index.ts index a55a8959dcd89d1dccd477710df6bb1a6e7290a6..e65a8b2fa41f7f0d56631ad25c2ce358c510d658 100644 --- a/lib/datasource/hex/index.ts +++ b/lib/datasource/hex/index.ts @@ -41,7 +41,7 @@ export async function getPkgReleases({ const { releases = [], html_url: homepage, meta } = hexRelease; if (releases.length === 0) { - logger.info(`No versions found for ${depName} (${hexUrl})`); // prettier-ignore + logger.debug(`No versions found for ${depName} (${hexUrl})`); // prettier-ignore return null; } diff --git a/lib/datasource/maven/index.ts b/lib/datasource/maven/index.ts index c6916401d602c4308b810afd5a379957ea9dcc67..2263755a182e8aa2914b8ccbc936190e84a4c2b7 100644 --- a/lib/datasource/maven/index.ts +++ b/lib/datasource/maven/index.ts @@ -169,7 +169,7 @@ export async function getPkgReleases({ } if (versions.length === 0) { - logger.info(`No versions found for ${dependency.display} in ${repositories.length} repositories`); // prettier-ignore + logger.debug(`No versions found for ${dependency.display} in ${repositories.length} repositories`); // prettier-ignore return null; } logger.debug(`Found ${versions.length} versions for ${dependency.display}`); diff --git a/lib/datasource/maven/util.ts b/lib/datasource/maven/util.ts index 9b9e90881034dca1e31d60d74c7484f0efbb2e56..b79f5ca57f61c0e699b9913772674b3b67a3b30c 100644 --- a/lib/datasource/maven/util.ts +++ b/lib/datasource/maven/util.ts @@ -72,13 +72,13 @@ export async function downloadHttpProtocol( 'Dependency lookup unauthorized. Please add authentication with a hostRule' ); } else if (isTemporalError(err)) { - logger.info({ failedUrl, err }, 'Temporary error'); + logger.debug({ failedUrl, err }, 'Temporary error'); if (isMavenCentral(pkgUrl)) { throw new DatasourceError(err); } } else if (isConnectionError(err)) { // istanbul ignore next - logger.info({ failedUrl }, 'Connection refused to maven registry'); + logger.debug({ failedUrl }, 'Connection refused to maven registry'); } else { logger.warn({ failedUrl, err }, 'Unknown error'); } diff --git a/lib/datasource/npm/get.ts b/lib/datasource/npm/get.ts index 1cffe927b7a7e510cda94c9b6fd189c84bc064ca..c477ac4dedf76b2f3de3e99781bbf99a187ee775 100644 --- a/lib/datasource/npm/get.ts +++ b/lib/datasource/npm/get.ts @@ -118,7 +118,7 @@ export async function getDependency( const raw = await got(pkgUrl, opts); // istanbul ignore if if (retries < 3) { - logger.info({ pkgUrl, retries }, 'Recovered from npm error'); + logger.debug({ pkgUrl, retries }, 'Recovered from npm error'); } const res = raw.body; // eslint-disable-next-line no-underscore-dangle @@ -132,7 +132,7 @@ export async function getDependency( } if (!res.versions || !Object.keys(res.versions).length) { // Registry returned a 200 OK but with no versions - logger.info({ dependency: name }, 'No versions returned'); + logger.debug({ dependency: name }, 'No versions returned'); return null; } @@ -195,7 +195,7 @@ export async function getDependency( return dep; } catch (err) { if (err.statusCode === 401 || err.statusCode === 403) { - logger.info( + logger.debug( { pkgUrl, authInfoType: authInfo ? authInfo.type : undefined, @@ -210,7 +210,7 @@ export async function getDependency( } // istanbul ignore if if (err.statusCode === 402) { - logger.info( + logger.debug( { pkgUrl, authInfoType: authInfo ? authInfo.type : undefined, @@ -224,7 +224,7 @@ export async function getDependency( return null; } if (err.statusCode === 404 || err.code === 'ENOTFOUND') { - logger.info({ depName: name }, `Dependency lookup failure: not found`); + logger.debug({ depName: name }, `Dependency lookup failure: not found`); logger.debug({ err, token: authInfo ? maskToken(authInfo.token) : 'none', @@ -237,7 +237,7 @@ export async function getDependency( (err.name === 'ParseError' || err.code === 'ECONNRESET') && retries > 0 ) { - logger.info({ pkgUrl, errName: err.name }, 'Retrying npm error'); + logger.debug({ pkgUrl, errName: err.name }, 'Retrying npm error'); await delay(5000); return getDependency(name, retries - 1); } diff --git a/lib/datasource/npm/npmrc.ts b/lib/datasource/npm/npmrc.ts index f8913311527ce62b70f42f0b019f4e851fe7aaf9..2ebfac5ad95c8f23f7a2eddd6c81e1ea04cba17a 100644 --- a/lib/datasource/npm/npmrc.ts +++ b/lib/datasource/npm/npmrc.ts @@ -45,7 +45,7 @@ export function setNpmrc(input?: string): void { val && val.includes('localhost') ) { - logger.info( + logger.debug( { key, val }, 'Detected localhost registry - rejecting npmrc file' ); diff --git a/lib/datasource/npm/presets.ts b/lib/datasource/npm/presets.ts index dbe911b329fd2d94d5d77e165aa5733df6faed5f..2ca515fc5c4b76be3148acc24070e5c16ac7416b 100644 --- a/lib/datasource/npm/presets.ts +++ b/lib/datasource/npm/presets.ts @@ -16,7 +16,7 @@ export async function getPreset( const presetConfig = dep['renovate-config'][presetName]; if (!presetConfig) { const presetNames = Object.keys(dep['renovate-config']); - logger.info( + logger.debug( { presetNames, presetName }, 'Preset not found within renovate-config' ); diff --git a/lib/datasource/nuget/index.ts b/lib/datasource/nuget/index.ts index 8e50396c49983738fa3ec9e30dd816b2d79765a7..7bef53a785a07aaa8fef903472986fa8f12d1438 100644 --- a/lib/datasource/nuget/index.ts +++ b/lib/datasource/nuget/index.ts @@ -39,7 +39,7 @@ export async function getPkgReleases({ } } if (dep === null) { - logger.info( + logger.debug( { lookupName }, `Dependency lookup failure: not found in all feeds` ); diff --git a/lib/datasource/orb/index.ts b/lib/datasource/orb/index.ts index c4a3e9660e771df55773e147ac55ae27e61fd679..6a5af89bfcd9dc572087130c391bef54f33a549b 100644 --- a/lib/datasource/orb/index.ts +++ b/lib/datasource/orb/index.ts @@ -42,7 +42,7 @@ export async function getPkgReleases({ }) ).body.data.orb; if (!res) { - logger.info({ lookupName }, 'Failed to look up orb'); + logger.debug({ lookupName }, 'Failed to look up orb'); return null; } // Simplify response before caching and returning @@ -67,7 +67,7 @@ export async function getPkgReleases({ } catch (err) /* istanbul ignore next */ { logger.debug({ err }, 'CircleCI Orb lookup error'); if (err.statusCode === 404 || err.code === 'ENOTFOUND') { - logger.info({ lookupName }, `CircleCI Orb lookup failure: not found`); + logger.debug({ lookupName }, `CircleCI Orb lookup failure: not found`); return null; } logger.warn({ lookupName }, 'CircleCI Orb lookup failure: Unknown error'); diff --git a/lib/datasource/packagist/index.ts b/lib/datasource/packagist/index.ts index f607e103be22b01b3854a091ad8bca607e245ccd..7210ddc048503adfa9c923c0212c67a0228bb497 100644 --- a/lib/datasource/packagist/index.ts +++ b/lib/datasource/packagist/index.ts @@ -73,11 +73,11 @@ async function getRegistryMeta(regUrl: string): Promise<RegistryMeta | null> { return meta; } catch (err) { if (err.code === 'ETIMEDOUT') { - logger.info({ regUrl }, 'Packagist timeout'); + logger.debug({ regUrl }, 'Packagist timeout'); return null; } if (err.statusCode === 401 || err.statusCode === 403) { - logger.info({ regUrl }, 'Unauthorized Packagist repository'); + logger.debug({ regUrl }, 'Unauthorized Packagist repository'); return null; } if ( @@ -85,7 +85,7 @@ async function getRegistryMeta(regUrl: string): Promise<RegistryMeta | null> { err.url && err.url.endsWith('/packages.json') ) { - logger.info({ regUrl }, 'Packagist repository not found'); + logger.debug({ regUrl }, 'Packagist repository not found'); return null; } logger.warn({ err }, 'Packagist download error'); @@ -282,7 +282,10 @@ async function packageLookup( return dep; } catch (err) /* istanbul ignore next */ { if (err.statusCode === 404 || err.code === 'ENOTFOUND') { - logger.info({ dependency: name }, `Dependency lookup failure: not found`); + logger.debug( + { dependency: name }, + `Dependency lookup failure: not found` + ); logger.debug({ err, }); diff --git a/lib/datasource/pypi/index.ts b/lib/datasource/pypi/index.ts index 9e023235126fb11991dbbc1d76e962d14a8dbdb8..2233aef0e3196944d28df1dfaefae757431bd15a 100644 --- a/lib/datasource/pypi/index.ts +++ b/lib/datasource/pypi/index.ts @@ -75,7 +75,7 @@ async function getDependency( } return dependency; } catch (err) { - logger.info( + logger.debug( 'pypi dependency not found: ' + depName + '(searching in ' + hostUrl + ')' ); return null; @@ -141,7 +141,7 @@ async function getSimpleDependency( } return dependency; } catch (err) { - logger.info( + logger.debug( 'pypi dependency not found: ' + depName + '(searching in ' + hostUrl + ')' ); return null; diff --git a/lib/datasource/rubygems/get.ts b/lib/datasource/rubygems/get.ts index 5eb953727c9c9926fa6bdb12bcb04acb4fbf14c2..a04efd06b8cf1979bb26d4ffe295142773992918 100644 --- a/lib/datasource/rubygems/get.ts +++ b/lib/datasource/rubygems/get.ts @@ -21,11 +21,11 @@ const processError = ({ err, ...rest }): null => { }; if (code === 'ENOTFOUND' || statusCode === NOT_FOUND) { - logger.info(data, 'RubyGems lookup failure: not found'); + logger.debug(data, 'RubyGems lookup failure: not found'); } else if (statusCode === FORBIDDEN || statusCode === UNAUTHORIZED) { - logger.info(data, 'RubyGems lookup failure: authentication failed'); + logger.debug(data, 'RubyGems lookup failure: authentication failed'); } else { - logger.info(data, 'RubyGems lookup failure: unknown reason'); + logger.debug(data, 'RubyGems lookup failure: unknown reason'); } return null; }; diff --git a/lib/datasource/rubygems/retriable.ts b/lib/datasource/rubygems/retriable.ts index 11c79124b119e1636d7e3a52d3645ffc74002af5..8d85ed2c4ef6bef791a17af9f4910c7596f94dd5 100644 --- a/lib/datasource/rubygems/retriable.ts +++ b/lib/datasource/rubygems/retriable.ts @@ -57,7 +57,7 @@ export default (numberOfRetries = NUMBER_OF_RETRIES): got.RetryFunction => ( const errorMessage = getErrorMessage(statusCode); const message = `${errorMessage} Retry in ${delaySec} seconds.`; - logger.info(message); + logger.debug(message); return delaySec * 1000; }; diff --git a/lib/datasource/sbt/index.ts b/lib/datasource/sbt/index.ts index 3656b5b08724560001b9e6d4dd7b36d3969e23ba..b395ebe2398e850f0cc5883f6ceb8cecedf7719d 100644 --- a/lib/datasource/sbt/index.ts +++ b/lib/datasource/sbt/index.ts @@ -144,7 +144,7 @@ export async function getPkgReleases( } } - logger.info( + logger.debug( `No versions found for ${lookupName} in ${searchRoots.length} repositories` ); return null; diff --git a/lib/datasource/terraform-provider/index.ts b/lib/datasource/terraform-provider/index.ts index 3f25581a95caa1206a39cecc2eed75ab82b1c4ff..e47da1c81bed77d2a150bbcf74641d34accf8986 100644 --- a/lib/datasource/terraform-provider/index.ts +++ b/lib/datasource/terraform-provider/index.ts @@ -61,7 +61,7 @@ export async function getPkgReleases({ return dep; } catch (err) { if (err.statusCode === 404 || err.code === 'ENOTFOUND') { - logger.info( + logger.debug( { lookupName }, `Terraform registry lookup failure: not found` ); diff --git a/lib/datasource/terraform/index.ts b/lib/datasource/terraform/index.ts index 8f0c7ccafc95b235d8e3c6dd3888333e6e0dbcac..e4f5e908f3a4b08363307d7eba7194324caedb32 100644 --- a/lib/datasource/terraform/index.ts +++ b/lib/datasource/terraform/index.ts @@ -103,7 +103,7 @@ export async function getPkgReleases({ return dep; } catch (err) { if (err.statusCode === 404 || err.code === 'ENOTFOUND') { - logger.info( + logger.debug( { lookupName }, `Terraform registry lookup failure: not found` ); diff --git a/lib/logger/pretty-stdout.ts b/lib/logger/pretty-stdout.ts index f773f2b4691f9e6b1ee191264b93b539606e8707..61c7a11910b15fce6c2a64bad7f310a7a48bcad9 100644 --- a/lib/logger/pretty-stdout.ts +++ b/lib/logger/pretty-stdout.ts @@ -24,7 +24,6 @@ const metaFields = [ 'dependency', 'dependencies', 'branch', - 'logContext', ]; const levels: Record<number, string> = { @@ -64,7 +63,11 @@ export function getDetails(rec: BunyanRecord): string { const recFiltered = { ...rec }; delete recFiltered.module; Object.keys(recFiltered).forEach(key => { - if (bunyanFields.includes(key) || metaFields.includes(key)) { + if ( + key === 'logContext' || + bunyanFields.includes(key) || + metaFields.includes(key) + ) { delete recFiltered[key]; } }); diff --git a/lib/manager/ansible-galaxy/extract.ts b/lib/manager/ansible-galaxy/extract.ts index 7e5c7187328cae23143ca5dc277daaf201249e93..2cca76115e9d74dd19b1c1f197c957b6826023de 100644 --- a/lib/manager/ansible-galaxy/extract.ts +++ b/lib/manager/ansible-galaxy/extract.ts @@ -123,7 +123,7 @@ export default function extractPackageFile( } return { deps }; } catch (err) /* istanbul ignore next */ { - logger.info({ err }, 'Error extracting ansible-galaxy deps'); + logger.debug({ err }, 'Error extracting ansible-galaxy deps'); return null; } } diff --git a/lib/manager/ansible-galaxy/update.ts b/lib/manager/ansible-galaxy/update.ts index 7df0e7ea149f7191e6487e9d09cd044db09e6958..fe5c9a1c0ff8ac700317c551f9ed1661748d0363 100644 --- a/lib/manager/ansible-galaxy/update.ts +++ b/lib/manager/ansible-galaxy/update.ts @@ -27,7 +27,10 @@ export default function updateDependency({ lines[upgrade.managerData.lineNumber] = newLine; return lines.join('\n'); } catch (err) { - logger.info({ err }, 'Error setting new ansible-galaxy role version value'); + logger.debug( + { err }, + 'Error setting new ansible-galaxy role version value' + ); return null; } } diff --git a/lib/manager/ansible/update.ts b/lib/manager/ansible/update.ts index a59259155944ee5bc382c8982b9939ec09db84ae..bccacff450f234c35eb6eaccad0ea0aeef78ad58 100644 --- a/lib/manager/ansible/update.ts +++ b/lib/manager/ansible/update.ts @@ -25,7 +25,7 @@ export default function updateDependency({ lines[upgrade.managerData.lineNumber] = newLine; return lines.join('\n'); } catch (err) { - logger.info({ err }, 'Error setting new Dockerfile value'); + logger.debug({ err }, 'Error setting new Dockerfile value'); return null; } } diff --git a/lib/manager/bazel/extract.ts b/lib/manager/bazel/extract.ts index 1dd0cfe24909c45333c05182a94affbcae34affc..0e84d6c00afc0237972ffc2ad2c7808d88ab3f6a 100644 --- a/lib/manager/bazel/extract.ts +++ b/lib/manager/bazel/extract.ts @@ -247,7 +247,7 @@ export function extractPackageFile(content: string): PackageFile | null { dep.lookupName = repository; deps.push(dep); } else { - logger.info( + logger.debug( { def }, 'Failed to find dependency in bazel WORKSPACE definition' ); diff --git a/lib/manager/bazel/update.ts b/lib/manager/bazel/update.ts index b0413facb0a759bd623c0697b675ba2fe9dd834f..b0656d6c1c65b748008935e40892824ca0461a74 100644 --- a/lib/manager/bazel/update.ts +++ b/lib/manager/bazel/update.ts @@ -159,12 +159,12 @@ export async function updateDependency({ const existingDef = regEx(existingRegExStr); // istanbul ignore if if (!existingDef.test(fileContent)) { - logger.info('Cannot match existing string'); + logger.debug('Cannot match existing string'); return null; } return fileContent.replace(existingDef, newDef); } catch (err) /* istanbul ignore next */ { - logger.info({ err }, 'Error setting new bazel WORKSPACE version'); + logger.debug({ err }, 'Error setting new bazel WORKSPACE version'); return null; } } diff --git a/lib/manager/buildkite/update.ts b/lib/manager/buildkite/update.ts index 2f39257e9c33d8b56f3001ab05e0075b1420f9a2..a50fe12e0295b7ab4fc92171bccf1e82e5f96764 100644 --- a/lib/manager/buildkite/update.ts +++ b/lib/manager/buildkite/update.ts @@ -24,7 +24,7 @@ export function updateDependency({ lines[lineIdx] = newLine; return lines.join('\n'); } catch (err) { - logger.info({ err }, 'Error setting new buildkite version'); + logger.debug({ err }, 'Error setting new buildkite version'); return null; } } diff --git a/lib/manager/bundler/artifacts.ts b/lib/manager/bundler/artifacts.ts index 95d4cc12055bfabc0fec4c2bc1e44e591ae4d4d6..7dd603c81f8ed363589a77fa23c9d9019323e9cc 100644 --- a/lib/manager/bundler/artifacts.ts +++ b/lib/manager/bundler/artifacts.ts @@ -55,7 +55,7 @@ export async function updateArtifacts( logger.debug(`bundler.updateArtifacts(${packageFileName})`); // istanbul ignore if if (global.repoCache.bundlerArtifactsError) { - logger.info('Aborting Bundler artifacts due to previous failed attempt'); + logger.debug('Aborting Bundler artifacts due to previous failed attempt'); throw new Error(global.repoCache.bundlerArtifactsError); } const lockFileName = `${packageFileName}.lock`; @@ -133,7 +133,7 @@ export async function updateArtifacts( 'Please make sure you have the correct access rights' )) ) { - logger.info( + logger.debug( { err }, 'Gemfile.lock update failed due to missing credentials - skipping branch' ); @@ -167,7 +167,7 @@ export async function updateArtifacts( config, }); } - logger.info( + logger.debug( { err }, 'Gemfile.lock update failed due to incompatible packages' ); diff --git a/lib/manager/bundler/update.ts b/lib/manager/bundler/update.ts index 84ebe05c358577293732b05cd6a2574846de979b..7dd987eb766d28fb6b1f9400567bd21e5a7aaf7d 100644 --- a/lib/manager/bundler/update.ts +++ b/lib/manager/bundler/update.ts @@ -37,7 +37,7 @@ export function updateDependency({ lines[upgrade.managerData.lineNumber] = newLine; return lines.join('\n'); } catch (err) { - logger.info({ err }, 'Error setting new Gemfile value'); + logger.debug({ err }, 'Error setting new Gemfile value'); return null; } } diff --git a/lib/manager/cargo/update.ts b/lib/manager/cargo/update.ts index 75da4179cb5136aba48125a5ebbd4c252090c7cb..feda19f632236670388ea9c4ed45c8430f303663 100644 --- a/lib/manager/cargo/update.ts +++ b/lib/manager/cargo/update.ts @@ -33,12 +33,12 @@ export function updateDependency({ } if (!section) { if (target) { - logger.info( + logger.debug( { config: upgrade }, `Error: Section [target.${target}.${depType}] doesn't exist in Cargo.toml file, update failed` ); } else { - logger.info( + logger.debug( { config: upgrade }, `Error: Section [${depType}] doesn't exist in Cargo.toml file, update failed` ); @@ -48,7 +48,7 @@ export function updateDependency({ let oldVersion: any; const oldDep = section[depName]; if (!oldDep) { - logger.info( + logger.debug( { config: upgrade }, `Could not get version of dependency ${depName}, update failed (most likely name is invalid)` ); @@ -66,14 +66,14 @@ export function updateDependency({ oldVersion = oldVersion.version; } if (!oldVersion) { - logger.info( + logger.debug( { config: upgrade }, `Could not get version of dependency ${depName}, update failed (most likely name is invalid)` ); return fileContent; } if (oldVersion === newValue) { - logger.info('Version is already updated'); + logger.debug('Version is already updated'); return fileContent; } if (nestedVersion) { diff --git a/lib/manager/circleci/update.ts b/lib/manager/circleci/update.ts index 4e4839c54d8785dbf387ec66b0320d40a1644f32..3af78159bb35634a780b18513f62e1b4fd7e87f6 100644 --- a/lib/manager/circleci/update.ts +++ b/lib/manager/circleci/update.ts @@ -42,7 +42,7 @@ export function updateDependency({ logger.error('Unknown circleci depType'); return null; } catch (err) { - logger.info({ err }, 'Error setting new CircleCI image value'); + logger.debug({ err }, 'Error setting new CircleCI image value'); return null; } } diff --git a/lib/manager/composer/extract.ts b/lib/manager/composer/extract.ts index 2da742fd4aed89e09951b1d45fb1a45de2ea53a5..f9ed1ca7c12098f6364511882dab5fbce8307ba5 100644 --- a/lib/manager/composer/extract.ts +++ b/lib/manager/composer/extract.ts @@ -57,7 +57,10 @@ function parseRepositories( registryUrls.push(repo.url); break; case 'package': - logger.info({ url: repo.url }, 'type package is not supported yet'); + logger.debug( + { url: repo.url }, + 'type package is not supported yet' + ); } if (repo.packagist === false || repo['packagist.org'] === false) { packagist = false; @@ -75,7 +78,7 @@ function parseRepositories( logger.debug('Disabling packagist.org'); } } catch (e) /* istanbul ignore next */ { - logger.info( + logger.debug( { repositories: repoJson }, 'Error parsing composer.json repositories config' ); @@ -91,7 +94,7 @@ export async function extractPackageFile( try { composerJson = JSON.parse(content); } catch (err) { - logger.info({ fileName }, 'Invalid JSON'); + logger.debug({ fileName }, 'Invalid JSON'); return null; } const repositories: Record<string, Repo> = {}; @@ -171,7 +174,7 @@ export async function extractPackageFile( deps.push(dep); } } catch (err) /* istanbul ignore next */ { - logger.info({ fileName, depType, err }, 'Error parsing composer.json'); + logger.debug({ fileName, depType, err }, 'Error parsing composer.json'); return null; } } diff --git a/lib/manager/composer/range.ts b/lib/manager/composer/range.ts index 2293a62587d33bb6eb7db95509953543f8ffc5c2..6089a31638f75d4bad9fceef160a2220c828f4fa 100644 --- a/lib/manager/composer/range.ts +++ b/lib/manager/composer/range.ts @@ -13,7 +13,7 @@ export function getRangeStrategy(config: RangeConfig): RangeStrategy { const { composerJsonType } = managerData; const isComplexRange = currentValue && currentValue.includes(' || '); if (rangeStrategy === 'bump' && isComplexRange) { - logger.info( + logger.debug( { currentValue }, 'Replacing bump strategy for complex range with widen' ); diff --git a/lib/manager/docker-compose/extract.ts b/lib/manager/docker-compose/extract.ts index 8774e2f2916c08dbf08399ada6ef1205c5153778..d5821b317656dc69cc08256fbbd0f1b92afb72f0 100644 --- a/lib/manager/docker-compose/extract.ts +++ b/lib/manager/docker-compose/extract.ts @@ -57,7 +57,7 @@ export function extractPackageFile( } } catch (err) { logger.debug({ err }, 'err'); - logger.info({ fileName }, 'Parsing Docker Compose config YAML'); + logger.debug({ fileName }, 'Parsing Docker Compose config YAML'); return null; } try { diff --git a/lib/manager/docker-compose/update.ts b/lib/manager/docker-compose/update.ts index dd8e3e73668784000ff385f5cd14fe2aa1f861cb..1ad3f73e6a3e48600df05e7b0da3848cdedff714 100644 --- a/lib/manager/docker-compose/update.ts +++ b/lib/manager/docker-compose/update.ts @@ -24,7 +24,7 @@ export function updateDependency({ lines[upgrade.managerData.lineNumber] = newLine; return lines.join('\n'); } catch (err) { - logger.info({ err }, 'Error setting new Dockerfile value'); + logger.debug({ err }, 'Error setting new Dockerfile value'); return null; } } diff --git a/lib/manager/dockerfile/extract.ts b/lib/manager/dockerfile/extract.ts index 5e659aa14240968f10765fe6eab1863572bb53be..381e0295b44875d08ebc8a0bfa2f16ef840c3418 100644 --- a/lib/manager/dockerfile/extract.ts +++ b/lib/manager/dockerfile/extract.ts @@ -89,7 +89,7 @@ export function extractPackageFile(content: string): PackageFile | null { logger.debug({ currentFrom }, 'Skipping index reference COPY --from'); } else { const dep = getDep(currentFrom); - logger.info( + logger.debug( { depName: dep.depName, currentValue: dep.currentValue, diff --git a/lib/manager/dockerfile/update.ts b/lib/manager/dockerfile/update.ts index 0365be47c5d023f5378e39a9998f9297ff25f7a0..bf3c9c260133d0038dc587184ccf8d4a1023374b 100644 --- a/lib/manager/dockerfile/update.ts +++ b/lib/manager/dockerfile/update.ts @@ -40,7 +40,7 @@ export function updateDependency({ lines[lineNumber] = newLine; return lines.join('\n'); } catch (err) { - logger.info({ err }, 'Error setting new Dockerfile value'); + logger.debug({ err }, 'Error setting new Dockerfile value'); return null; } } diff --git a/lib/manager/droneci/update.ts b/lib/manager/droneci/update.ts index 3939105e45adf132a034df93280490eac1a23848..920a28770fac03127283495ebd1aa9619c1d25ea 100644 --- a/lib/manager/droneci/update.ts +++ b/lib/manager/droneci/update.ts @@ -28,7 +28,7 @@ export function updateDependency({ logger.error('Unknown DroneCI depType'); return null; } catch (err) { - logger.info({ err }, 'Error setting new DroneCI image value'); + logger.debug({ err }, 'Error setting new DroneCI image value'); return null; } } diff --git a/lib/manager/github-actions/update.ts b/lib/manager/github-actions/update.ts index c5d932439e146323655c3bc860eca10c0f10c646..0b005bbf0d680cec4cb655a4971fc253c4fd3419 100644 --- a/lib/manager/github-actions/update.ts +++ b/lib/manager/github-actions/update.ts @@ -24,7 +24,7 @@ export function updateDependency({ lines[upgrade.managerData.lineNumber] = newLine; return lines.join('\n'); } catch (err) { - logger.info({ err }, 'Error setting new github-actions value'); + logger.debug({ err }, 'Error setting new github-actions value'); return null; } } diff --git a/lib/manager/gitlabci-include/extract.ts b/lib/manager/gitlabci-include/extract.ts index 4b6d41fd349660f8b048d32b3ef7aab604e2815a..50478052fe2ddb1f5ed0dbc7afb4591bb4e82a3b 100644 --- a/lib/manager/gitlabci-include/extract.ts +++ b/lib/manager/gitlabci-include/extract.ts @@ -47,7 +47,7 @@ export function extractPackageFile( } catch (err) /* istanbul ignore next */ { if (err.stack && err.stack.startsWith('YAMLException:')) { logger.debug({ err }); - logger.info('YAML exception extracting GitLab CI includes'); + logger.debug('YAML exception extracting GitLab CI includes'); } else { logger.warn({ err }, 'Error extracting GitLab CI includes'); } diff --git a/lib/manager/gitlabci-include/update.ts b/lib/manager/gitlabci-include/update.ts index 41eab2d37f037f3896b95c870e434615123ccfbb..8ed741cdef64c115064b4791fc089c21237b0c14 100644 --- a/lib/manager/gitlabci-include/update.ts +++ b/lib/manager/gitlabci-include/update.ts @@ -27,7 +27,7 @@ export function updateDependency({ return yawn.yaml; } catch (err) { - logger.info({ err }, 'Error setting new .gitlab-ci.yml include value'); + logger.debug({ err }, 'Error setting new .gitlab-ci.yml include value'); return null; } } diff --git a/lib/manager/gitlabci/update.ts b/lib/manager/gitlabci/update.ts index 77946b3ca3167d885377d07efc1b0a9a0a4bf864..bdd29099001ad2413224154ff17f4b4c8377b5ce 100644 --- a/lib/manager/gitlabci/update.ts +++ b/lib/manager/gitlabci/update.ts @@ -37,7 +37,7 @@ export function updateDependency({ lines[upgrade.managerData.lineNumber] = newLine; return lines.join('\n'); } catch (err) { - logger.info({ err }, 'Error setting new Dockerfile value'); + logger.debug({ err }, 'Error setting new Dockerfile value'); return null; } } diff --git a/lib/manager/gomod/artifacts.ts b/lib/manager/gomod/artifacts.ts index 9b5e98a4229cabf1f1a313ad0794d5bde03da5e2..24cf7fa0aee2e9ff89770892e8d165472471ea34 100644 --- a/lib/manager/gomod/artifacts.ts +++ b/lib/manager/gomod/artifacts.ts @@ -134,7 +134,7 @@ export async function updateArtifacts({ '' ); if (finalGoModContent !== newGoModContent) { - logger.info('Found updated go.mod after go.sum update'); + logger.debug('Found updated go.mod after go.sum update'); res.push({ file: { name: goModFileName, @@ -144,7 +144,7 @@ export async function updateArtifacts({ } return res; } catch (err) { - logger.info({ err }, 'Failed to update go.sum'); + logger.debug({ err }, 'Failed to update go.sum'); return [ { artifactError: { diff --git a/lib/manager/gomod/update.ts b/lib/manager/gomod/update.ts index d4c781634d4c86edf4c32a39f3e0fd7479eee834..c7d4965f6415027a4571ed0f8ed1503f63564716 100644 --- a/lib/manager/gomod/update.ts +++ b/lib/manager/gomod/update.ts @@ -110,7 +110,7 @@ export function updateDependency({ lines[upgrade.managerData.lineNumber] = newLine; return lines.join('\n'); } catch (err) { - logger.info({ err }, 'Error setting new go.mod version'); + logger.debug({ err }, 'Error setting new go.mod version'); return null; } } diff --git a/lib/manager/gradle-wrapper/extract.ts b/lib/manager/gradle-wrapper/extract.ts index e29fe1914e3899ea248ede8aabca59fcbba93ced..a12ce4dfa04ee29fe5566557fea1b3a9d4766644 100644 --- a/lib/manager/gradle-wrapper/extract.ts +++ b/lib/manager/gradle-wrapper/extract.ts @@ -33,7 +33,7 @@ export function extractPackageFile(fileContent: string): PackageFile | null { shaLineNumber += 1; } - logger.info(dependency, 'Gradle Wrapper'); + logger.debug(dependency, 'Gradle Wrapper'); return { deps: [dependency] }; } lineNumber += 1; diff --git a/lib/manager/gradle-wrapper/update.ts b/lib/manager/gradle-wrapper/update.ts index f47e6e2c378e202a37150ec7f38779e005e29167..9d688c98e0cfe1a535d04165a9ef09ef38a6e856 100644 --- a/lib/manager/gradle-wrapper/update.ts +++ b/lib/manager/gradle-wrapper/update.ts @@ -12,7 +12,7 @@ async function getChecksum(url: string): Promise<string> { return response.body as string; } catch (err) { if (err.statusCode === 404 || err.code === 'ENOTFOUND') { - logger.info('Gradle checksum lookup failure: not found'); + logger.debug('Gradle checksum lookup failure: not found'); logger.debug({ err }); } else { logger.warn({ err }, 'Gradle checksum lookup failure: Unknown error'); @@ -49,7 +49,7 @@ export async function updateDependency({ return lines.join('\n'); } catch (err) { - logger.info({ err }, 'Error setting new Gradle Wrapper release value'); + logger.debug({ err }, 'Error setting new Gradle Wrapper release value'); return null; } } diff --git a/lib/manager/gradle/index.ts b/lib/manager/gradle/index.ts index 8696a1e316e1b62ba4e36096931bbae8e4296487..058984edbe01aa5261536db72fb8db6c41aa258e 100644 --- a/lib/manager/gradle/index.ts +++ b/lib/manager/gradle/index.ts @@ -88,7 +88,7 @@ async function executeGradle( return; } logger.debug(stdout + stderr); - logger.info('Gradle report complete'); + logger.debug('Gradle report complete'); } export async function extractAllPackageFiles( @@ -117,7 +117,7 @@ export async function extractAllPackageFiles( logger.warn('No root build.gradle nor build.gradle.kts found - skipping'); return null; } - logger.info('Extracting dependencies from all gradle files'); + logger.debug('Extracting dependencies from all gradle files'); const cwd = upath.join(config.localDir, upath.dirname(rootBuildGradle)); @@ -144,7 +144,7 @@ export async function extractAllPackageFiles( collectVersionVariables(dependencies, content); } else { // istanbul ignore next - logger.info({ packageFile }, 'packageFile has no content'); + logger.debug({ packageFile }, 'packageFile has no content'); } } diff --git a/lib/manager/helm-values/extract.ts b/lib/manager/helm-values/extract.ts index 7226fa633f7ffd00927faa4eaa43f1b3425c140a..e7fc2ac7577a5b6b78ff37b7f8a89641bdf9191b 100644 --- a/lib/manager/helm-values/extract.ts +++ b/lib/manager/helm-values/extract.ts @@ -43,7 +43,7 @@ export function extractPackageFile(content: string): PackageFile { // the current approach we need to match anything we find again during the update parsedContent = yaml.safeLoad(content, { json: true }); } catch (err) { - logger.info({ err }, 'Failed to parse helm-values YAML'); + logger.debug({ err }, 'Failed to parse helm-values YAML'); return null; } try { diff --git a/lib/manager/helm-values/update.ts b/lib/manager/helm-values/update.ts index 2823f218f832b59e08fb8b4b22cf59b05bfb1f86..d0ce8ee3a47d295b6c556d07da8492e7c86f92ce 100644 --- a/lib/manager/helm-values/update.ts +++ b/lib/manager/helm-values/update.ts @@ -122,7 +122,7 @@ export function updateDependency({ return yawn.yaml; } catch (err) { - logger.info({ err }, 'Error setting new helm-values value'); + logger.debug({ err }, 'Error setting new helm-values value'); return fileContent; } } diff --git a/lib/manager/kubernetes/update.ts b/lib/manager/kubernetes/update.ts index f45229fc589a3f9783f982638d300f24e5e7238f..f1ab8c2978cb67a9c5deae78617130b04f8f015d 100644 --- a/lib/manager/kubernetes/update.ts +++ b/lib/manager/kubernetes/update.ts @@ -24,7 +24,7 @@ export function updateDependency({ lines[upgrade.managerData.lineNumber] = newLine; return lines.join('\n'); } catch (err) { - logger.info({ err }, 'Error setting new Kubernetes value'); + logger.debug({ err }, 'Error setting new Kubernetes value'); return null; } } diff --git a/lib/manager/maven/extract.ts b/lib/manager/maven/extract.ts index d89702f123dcdeaa19ee15d8bb66f68cace32aff..82beeb5eedddbb897a6b835ce9a4e8f3f0ef6bf6 100644 --- a/lib/manager/maven/extract.ts +++ b/lib/manager/maven/extract.ts @@ -299,10 +299,10 @@ export async function extractAllPackageFiles( if (pkg) { packages.push(pkg); } else { - logger.info({ packageFile }, 'can not read dependencies'); + logger.debug({ packageFile }, 'can not read dependencies'); } } else { - logger.info({ packageFile }, 'packageFile has no content'); + logger.debug({ packageFile }, 'packageFile has no content'); } } return cleanResult(resolveParents(packages)); diff --git a/lib/manager/npm/extract/index.ts b/lib/manager/npm/extract/index.ts index a41401b0b3145643b48e43b634412c9c320ec0c8..9ac32972fad5a5a47c1466a05459906f7fabdccc 100644 --- a/lib/manager/npm/extract/index.ts +++ b/lib/manager/npm/extract/index.ts @@ -35,12 +35,12 @@ export async function extractPackageFile( try { packageJson = JSON.parse(content); } catch (err) { - logger.info({ fileName }, 'Invalid JSON'); + logger.debug({ fileName }, 'Invalid JSON'); return null; } // eslint-disable-next-line no-underscore-dangle if (packageJson._id && packageJson._args && packageJson._from) { - logger.info('Ignoring vendorised package.json'); + logger.debug('Ignoring vendorised package.json'); return null; } if (fileName !== 'package.json' && packageJson.renovate) { @@ -94,12 +94,12 @@ export async function extractPackageFile( } else { npmrc = await platform.getFile(npmrcFileName); if (npmrc && npmrc.includes('package-lock')) { - logger.info('Stripping package-lock setting from npmrc'); + logger.debug('Stripping package-lock setting from npmrc'); npmrc = npmrc.replace(/(^|\n)package-lock.*?(\n|$)/g, '\n'); } if (npmrc) { if (npmrc.includes('=${') && !(global.trustLevel === 'high')) { - logger.info('Discarding .npmrc file with variables'); + logger.debug('Discarding .npmrc file with variables'); ignoreNpmrcFile = true; npmrc = undefined; await remove(npmrcFileNameLocal); @@ -202,7 +202,7 @@ export async function extractPackageFile( dep.lookupName = valSplit[0] + '@' + valSplit[1]; dep.currentValue = valSplit[2]; } else { - logger.info('Invalid npm package alias: ' + dep.currentValue); + logger.debug('Invalid npm package alias: ' + dep.currentValue); } } if (dep.currentValue.startsWith('file:')) { @@ -290,7 +290,7 @@ export async function extractPackageFile( deps.push(dep); } } catch (err) /* istanbul ignore next */ { - logger.info({ fileName, depType, err }, 'Error parsing package.json'); + logger.debug({ fileName, depType, err }, 'Error parsing package.json'); return null; } } @@ -317,7 +317,7 @@ export async function extractPackageFile( // Explanation: // - npm install --package-lock-only is buggy for transitive deps in file: references // - So we set skipInstalls to false if file: refs are found *and* the user hasn't explicitly set the value already - logger.info('Automatically setting skipInstalls to false'); + logger.debug('Automatically setting skipInstalls to false'); skipInstalls = false; } else { skipInstalls = true; @@ -362,7 +362,7 @@ export async function extractAllPackageFiles( }); } } else { - logger.info({ packageFile }, 'packageFile has no content'); + logger.debug({ packageFile }, 'packageFile has no content'); } } await postExtract(npmFiles); diff --git a/lib/manager/npm/extract/locked-versions.ts b/lib/manager/npm/extract/locked-versions.ts index 9f96a01069c9373de2ab7b5b8cda9a005777f756..832f3b9729a85117c40e4783621c2e08a6a2e002 100644 --- a/lib/manager/npm/extract/locked-versions.ts +++ b/lib/manager/npm/extract/locked-versions.ts @@ -38,7 +38,7 @@ export async function getLockedVersions( dep.lockedVersion = valid(lockFileCache[npmLock][dep.depName]); } } else if (pnpmShrinkwrap) { - logger.info('TODO: implement pnpm-lock.yaml parsing of lockVersion'); + logger.debug('TODO: implement pnpm-lock.yaml parsing of lockVersion'); } } } diff --git a/lib/manager/npm/extract/npm.ts b/lib/manager/npm/extract/npm.ts index 668b0b149f846de6cf739fa04b67b9281c15f823..e3c4f31ae3d1f6e50ee388219fd34ae12fc39f52 100644 --- a/lib/manager/npm/extract/npm.ts +++ b/lib/manager/npm/extract/npm.ts @@ -17,7 +17,7 @@ export async function getNpmLock( } return lockFile; } catch (err) { - logger.info({ filePath, err }, 'Warning: Exception parsing npm lock file'); + logger.debug({ filePath, err }, 'Warning: Exception parsing npm lock file'); return {}; } } diff --git a/lib/manager/npm/extract/yarn.ts b/lib/manager/npm/extract/yarn.ts index d4498aef36a3bff0dfbffa167b3fece111277315..839dec733ff52432233b45fd31ba20d5c36f2104 100644 --- a/lib/manager/npm/extract/yarn.ts +++ b/lib/manager/npm/extract/yarn.ts @@ -13,7 +13,7 @@ export async function getYarnLock(filePath: string): Promise<YarnLock> { const yarnLockParsed = parse(yarnLockRaw); // istanbul ignore if if (yarnLockParsed.type !== 'success') { - logger.info( + logger.debug( { filePath, parseType: yarnLockParsed.type }, 'Error parsing yarn.lock - not success' ); @@ -33,7 +33,7 @@ export async function getYarnLock(filePath: string): Promise<YarnLock> { } return lockFile; } catch (err) { - logger.info({ filePath, err }, 'Warning: Exception parsing yarn.lock'); + logger.debug({ filePath, err }, 'Warning: Exception parsing yarn.lock'); return {}; } } diff --git a/lib/manager/npm/post-update/index.ts b/lib/manager/npm/post-update/index.ts index 397385281f6da47b90740bdcf1e91c6f1be5b22f..26e5bcce4a1bbd086499ad0417c8ea43412d5b18 100644 --- a/lib/manager/npm/post-update/index.ts +++ b/lib/manager/npm/post-update/index.ts @@ -195,7 +195,7 @@ export async function writeExistingFiles( } } if (widens.length) { - logger.info(`Removing ${widens} from ${npmLock} to force an update`); + logger.debug(`Removing ${widens} from ${npmLock} to force an update`); try { const npmLockParsed = JSON.parse(existingNpmLock); if (npmLockParsed.dependencies) { @@ -314,7 +314,7 @@ export async function getAdditionalFiles( return { artifactErrors, updatedArtifacts }; } if (!config.updateLockFiles) { - logger.info('Skipping lock file generation'); + logger.debug('Skipping lock file generation'); return { artifactErrors, updatedArtifacts }; } logger.debug('Getting updated lock files'); @@ -380,7 +380,7 @@ export async function getAdditionalFiles( `No matching version found for ${upgrade.depName}` ) ) { - logger.info( + logger.debug( { dependency: upgrade.depName, type: 'npm' }, 'lock file failed for the dependency being updated - skipping branch creation' ); @@ -435,7 +435,7 @@ export async function getAdditionalFiles( `Couldn't find any versions for \\\"${upgrade.depName}\\\"` ) ) { - logger.info( + logger.debug( { dependency: upgrade.depName, type: 'yarn' }, 'lock file failed for the dependency being updated - skipping branch creation' ); @@ -478,7 +478,7 @@ export async function getAdditionalFiles( .replace(/"/g, '') .replace(/\/?$/, '/'); const resolvedPath = upath.join(lockFileDir, mirrorPath); - logger.info('Found yarn offline mirror: ' + resolvedPath); + logger.debug('Found yarn offline mirror: ' + resolvedPath); const status = await platform.getRepoStatus(); for (const f of status.modified.concat(status.not_added)) { if (f.startsWith(resolvedPath)) { @@ -525,7 +525,7 @@ export async function getAdditionalFiles( `No compatible version found: ${upgrade.depName}` ) ) { - logger.info( + logger.debug( { dependency: upgrade.depName, type: 'pnpm' }, 'lock file failed for the dependency being updated - skipping branch creation' ); @@ -598,7 +598,7 @@ export async function getAdditionalFiles( `Couldn't find any versions for \\\"${upgrade.depName}\\\"` ) ) { - logger.info( + logger.debug( { dependency: upgrade.depName, type: 'yarn' }, 'lock file failed for the dependency being updated - skipping branch creation' ); @@ -614,7 +614,7 @@ export async function getAdditionalFiles( `No matching version found for ${upgrade.depName}` ) ) { - logger.info( + logger.debug( { dependency: upgrade.depName, type: 'npm' }, 'lock file failed for the dependency being updated - skipping branch creation' ); @@ -665,7 +665,7 @@ export async function getAdditionalFiles( } } catch (err) { if (config.updateType === 'lockFileMaintenance') { - logger.info( + logger.debug( { packageFile, lockFilePath }, 'No lock file found after lerna lockFileMaintenance' ); diff --git a/lib/manager/npm/post-update/lerna.ts b/lib/manager/npm/post-update/lerna.ts index 90177fe3d30866f5b3242f5c173bcc5258e98a0d..41e84ccf985e7a2ae469e87e235f2d6c1bac16aa 100644 --- a/lib/manager/npm/post-update/lerna.ts +++ b/lib/manager/npm/post-update/lerna.ts @@ -53,7 +53,7 @@ export async function generateLockFiles( env, }); } catch (err) /* istanbul ignore next */ { - logger.info( + logger.debug( { cmd, err, diff --git a/lib/manager/npm/post-update/npm.ts b/lib/manager/npm/post-update/npm.ts index ab38f4022511a13631eb19bc86f48217ef2faf8f..6d13ecc5711f7760dc9e4a5c8690da2943ada744 100644 --- a/lib/manager/npm/post-update/npm.ts +++ b/lib/manager/npm/post-update/npm.ts @@ -69,7 +69,7 @@ export async function generateLockFile( } // istanbul ignore if if (config.binarySource === BinarySource.Docker) { - logger.info('Running npm via docker'); + logger.debug('Running npm via docker'); cmd = `docker run --rm `; // istanbul ignore if if (config.dockerUser) { @@ -112,7 +112,7 @@ export async function generateLockFile( } const lockUpdates = upgrades.filter(upgrade => upgrade.isLockfileUpdate); if (lockUpdates.length) { - logger.info('Performing lockfileUpdate (npm)'); + logger.debug('Performing lockfileUpdate (npm)'); const updateCmd = `${cmd} ${args}` + lockUpdates @@ -126,7 +126,7 @@ export async function generateLockFile( stderr += updateRes.stderr ? updateRes.stderr : ''; } if (postUpdateOptions && postUpdateOptions.includes('npmDedupe')) { - logger.info('Performing npm dedupe'); + logger.debug('Performing npm dedupe'); const dedupeRes = await exec(`${cmd} dedupe`, { cwd, env, @@ -149,7 +149,7 @@ export async function generateLockFile( } lockFile = await readFile(join(cwd, filename), 'utf8'); } catch (err) /* istanbul ignore next */ { - logger.info( + logger.debug( { cmd, args, diff --git a/lib/manager/npm/post-update/pnpm.ts b/lib/manager/npm/post-update/pnpm.ts index 7b1069b5a16344686ff960c6dec54e21fea13a5b..7134573566632bb4443548e8d39ae239e779ac08 100644 --- a/lib/manager/npm/post-update/pnpm.ts +++ b/lib/manager/npm/post-update/pnpm.ts @@ -65,7 +65,7 @@ export async function generateLockFile( cmd = 'pnpm'; } if (config.binarySource === BinarySource.Docker) { - logger.info('Running pnpm via docker'); + logger.debug('Running pnpm via docker'); cmd = `docker run --rm `; // istanbul ignore if if (config.dockerUser) { @@ -102,7 +102,7 @@ export async function generateLockFile( })); lockFile = await readFile(join(cwd, 'pnpm-lock.yaml'), 'utf8'); } catch (err) /* istanbul ignore next */ { - logger.info( + logger.debug( { cmd, err, diff --git a/lib/manager/npm/post-update/yarn.ts b/lib/manager/npm/post-update/yarn.ts index bebb380002860efb10ced3f5c8f628aef10cbd69..2e753ef2c632709758382bb346966c454b9fd702 100644 --- a/lib/manager/npm/post-update/yarn.ts +++ b/lib/manager/npm/post-update/yarn.ts @@ -44,10 +44,10 @@ export async function generateLockFile( const renovatePath = await getInstalledPath('renovate', { local: true, }); - logger.info('Using nested bundled yarn@1.9.4 for install'); + logger.debug('Using nested bundled yarn@1.9.4 for install'); cmd = 'node ' + join(renovatePath, 'bin/yarn-1.9.4.js'); } catch (err) { - logger.info('Using bundled yarn@1.9.4 for install'); + logger.debug('Using bundled yarn@1.9.4 for install'); cmd = cmd.replace( 'node_modules/yarn/bin/yarn.js', 'bin/yarn-1.9.4.js' @@ -103,7 +103,7 @@ export async function generateLockFile( .filter(upgrade => upgrade.isLockfileUpdate) .map(upgrade => upgrade.depName); if (lockUpdates.length) { - logger.info('Performing lockfileUpdate (yarn)'); + logger.debug('Performing lockfileUpdate (yarn)'); const updateCmd = cmd + ' upgrade' + @@ -124,7 +124,7 @@ export async function generateLockFile( config.postUpdateOptions && config.postUpdateOptions.includes('yarnDedupeFewer') ) { - logger.info('Performing yarn dedupe fewer'); + logger.debug('Performing yarn dedupe fewer'); const dedupeCommand = 'npx yarn-deduplicate@1.1.1 --strategy fewer && yarn'; const dedupeRes = await exec(dedupeCommand, { @@ -142,7 +142,7 @@ export async function generateLockFile( config.postUpdateOptions && config.postUpdateOptions.includes('yarnDedupeHighest') ) { - logger.info('Performing yarn dedupe highest'); + logger.debug('Performing yarn dedupe highest'); const dedupeCommand = 'npx yarn-deduplicate@1.1.1 --strategy highest && yarn'; const dedupeRes = await exec(dedupeCommand, { @@ -158,7 +158,7 @@ export async function generateLockFile( } lockFile = await readFile(join(cwd, 'yarn.lock'), 'utf8'); } catch (err) /* istanbul ignore next */ { - logger.info( + logger.debug( { cmd, err, diff --git a/lib/manager/npm/range.ts b/lib/manager/npm/range.ts index c431081cf66130e6ef5a150ef6893571a4890ad6..0ea1a4e15064b352f8eaefc67c64316a410993a4 100644 --- a/lib/manager/npm/range.ts +++ b/lib/manager/npm/range.ts @@ -13,7 +13,7 @@ export function getRangeStrategy(config: RangeConfig): RangeStrategy { } = config; const isComplexRange = parseRange(currentValue).length > 1; if (rangeStrategy === 'bump' && isComplexRange) { - logger.info( + logger.debug( { currentValue }, 'Replacing bump strategy for complex range with widen' ); diff --git a/lib/manager/npm/update.ts b/lib/manager/npm/update.ts index 08be6a0fb12e5dc93e038a62877f5fc45c7921ea..10fac73e1b18ef58f4f7dac19a392320225bfee3 100644 --- a/lib/manager/npm/update.ts +++ b/lib/manager/npm/update.ts @@ -41,7 +41,7 @@ export function bumpPackageVersion( if (bumpedContent === content) { logger.debug('Version was already bumped'); } else { - logger.info('Bumped package.json version'); + logger.debug('Bumped package.json version'); } return bumpedContent; } catch (err) { @@ -65,13 +65,13 @@ export function updateDependency({ let { newValue } = upgrade; if (upgrade.currentRawValue) { if (upgrade.currentDigest) { - logger.info('Updating package.json git digest'); + logger.debug('Updating package.json git digest'); newValue = upgrade.currentRawValue.replace( upgrade.currentDigest, upgrade.newDigest.substring(0, upgrade.currentDigest.length) ); } else { - logger.info('Updating package.json git version tag'); + logger.debug('Updating package.json git version tag'); newValue = upgrade.currentRawValue.replace( upgrade.currentValue, upgrade.newValue @@ -124,7 +124,7 @@ export function updateDependency({ } // istanbul ignore if if (!newFileContent) { - logger.info( + logger.debug( { fileContent, parsedContents, depType, depName, newValue }, 'Warning: updateDependency error' ); @@ -140,7 +140,7 @@ export function updateDependency({ if (depKey) { // istanbul ignore if if (parsedContents.resolutions[depKey] !== oldVersion) { - logger.info( + logger.debug( { depName, depKey, @@ -185,7 +185,7 @@ export function updateDependency({ upgrade.bumpVersion ); } catch (err) { - logger.info({ err }, 'updateDependency error'); + logger.debug({ err }, 'updateDependency error'); return null; } } diff --git a/lib/manager/nuget/update.ts b/lib/manager/nuget/update.ts index 8051c960719378199251227e6265839548744592..6e414dc43d6dcf956ebe0ff215701bd805c7b6ad 100644 --- a/lib/manager/nuget/update.ts +++ b/lib/manager/nuget/update.ts @@ -18,7 +18,7 @@ export function updateDependency({ lines[upgrade.managerData.lineNumber] = newLine; return lines.join('\n'); } catch (err) { - logger.info({ err }, 'Error setting new nuget value'); + logger.debug({ err }, 'Error setting new nuget value'); return null; } } diff --git a/lib/manager/pip_requirements/update.ts b/lib/manager/pip_requirements/update.ts index 6cbecf2a4d8b14ef4a706a4d8102081c15e0e396..0ee2b8d1f3d7191e28662ae1f7f2bc3723b01b5f 100644 --- a/lib/manager/pip_requirements/update.ts +++ b/lib/manager/pip_requirements/update.ts @@ -35,7 +35,7 @@ export function updateDependency({ lines[upgrade.managerData.lineNumber] = newValue; return lines.join('\n'); } catch (err) { - logger.info({ err }, 'Error setting new package version'); + logger.debug({ err }, 'Error setting new package version'); return null; } } diff --git a/lib/manager/pip_setup/extract.ts b/lib/manager/pip_setup/extract.ts index fb25ed178e0bf408c75b241e082e676bae5831ff..29506b064dab7e724a5090333f6f1de71eb30ea6 100644 --- a/lib/manager/pip_setup/extract.ts +++ b/lib/manager/pip_setup/extract.ts @@ -52,7 +52,7 @@ export async function extractSetupFile( let cmd: string; const args = [`"${join(__dirname, 'extract.py')}"`, `"${packageFile}"`]; if (config.binarySource === BinarySource.Docker) { - logger.info('Running python via docker'); + logger.debug('Running python via docker'); await exec(`docker pull renovate/pip`); cmd = 'docker'; args.unshift( @@ -72,7 +72,7 @@ export async function extractSetupFile( 'python' ); } else { - logger.info('Running python via global command'); + logger.debug('Running python via global command'); cmd = await getPythonAlias(); } logger.debug({ cmd, args }, 'python command'); diff --git a/lib/manager/pipenv/extract.ts b/lib/manager/pipenv/extract.ts index cead95763ab64768bd9683a09856c599397bb31a..e9f0d6aea0e1f9dee3fbf76548c50e62b9ae1fa3 100644 --- a/lib/manager/pipenv/extract.ts +++ b/lib/manager/pipenv/extract.ts @@ -70,7 +70,7 @@ function extractFromSection( if (!skipReason) { const packageMatches = packageRegex.exec(depName); if (!packageMatches) { - logger.info( + logger.debug( `Skipping dependency with malformed package name "${depName}".` ); skipReason = 'invalid-name'; diff --git a/lib/manager/pipenv/update.ts b/lib/manager/pipenv/update.ts index f2d920bcb3f2d9fbe977120bdcb8e1bee57f5c94..504b162ed8d9c231775288ce7eaf5845269deac3 100644 --- a/lib/manager/pipenv/update.ts +++ b/lib/manager/pipenv/update.ts @@ -20,7 +20,7 @@ export function updateDependency({ oldVersion = parsedContents[depType][depName]; } if (oldVersion === newValue) { - logger.info('Version is already updated'); + logger.debug('Version is already updated'); return fileContent; } if (nestedVersion) { @@ -54,7 +54,7 @@ export function updateDependency({ } // istanbul ignore if if (!newFileContent) { - logger.info( + logger.debug( { fileContent, parsedContents, depType, depName, newValue }, 'Warning: updateDependency error' ); @@ -62,7 +62,7 @@ export function updateDependency({ } return newFileContent; } catch (err) { - logger.info({ err }, 'Error setting new package version'); + logger.debug({ err }, 'Error setting new package version'); return null; } } diff --git a/lib/manager/poetry/artifacts.ts b/lib/manager/poetry/artifacts.ts index b5d3690453c49fc6465119bdd33caa9dfd745efb..2fbf716cbdb97312bbdde8e9f18197a3931b6b3f 100644 --- a/lib/manager/poetry/artifacts.ts +++ b/lib/manager/poetry/artifacts.ts @@ -65,7 +65,7 @@ export async function updateArtifacts({ }, ]; } catch (err) { - logger.info({ err }, `Failed to update ${lockFileName} file`); + logger.debug({ err }, `Failed to update ${lockFileName} file`); return [ { artifactError: { diff --git a/lib/manager/poetry/update.ts b/lib/manager/poetry/update.ts index 0b141e7be502f47bc742fe80f6c918029341eb44..7def4540038f3e76461a4c5de0d6e5b3a73f8423 100644 --- a/lib/manager/poetry/update.ts +++ b/lib/manager/poetry/update.ts @@ -42,7 +42,7 @@ export function updateDependency({ const { nestedVersion } = managerData; const parsedContents: PoetryFile = parse(fileContent); if (!parsedContents.tool.poetry[depType]) { - logger.info( + logger.debug( { config: upgrade }, `Error: Section tool.poetry.${depType} doesn't exist in pyproject.toml file, update failed` ); @@ -52,7 +52,7 @@ export function updateDependency({ if (nestedVersion) { const oldDep = parsedContents.tool.poetry[depType][depName]; if (!oldDep) { - logger.info( + logger.debug( { config: upgrade }, `Could not get version of dependency ${depType}, update failed (most likely name is invalid)` ); @@ -63,14 +63,14 @@ export function updateDependency({ oldVersion = parsedContents.tool.poetry[depType][depName]; } if (!oldVersion) { - logger.info( + logger.debug( { config: upgrade }, `Could not get version of dependency ${depType}, update failed (most likely name is invalid)` ); return null; } if (oldVersion === newValue) { - logger.info('Version is already updated'); + logger.debug('Version is already updated'); return fileContent; } if (nestedVersion) { diff --git a/lib/manager/pub/extract.ts b/lib/manager/pub/extract.ts index 2dd2baff123fc791a7077911bbe269af83e43b66..59cb3a6ea3489a953acd126efaefa43441f0fb6f 100644 --- a/lib/manager/pub/extract.ts +++ b/lib/manager/pub/extract.ts @@ -55,7 +55,7 @@ export function extractPackageFile( }; } } catch (e) { - logger.info({ packageFile }, 'Can not parse dependency'); + logger.debug({ packageFile }, 'Can not parse dependency'); } return null; } diff --git a/lib/manager/terraform/extract.ts b/lib/manager/terraform/extract.ts index 7dd9b24c5f977e5f8187eb4b3325dffbc22b80b5..1896c6a3563f51492b1083eb746691fb55a6fc16 100644 --- a/lib/manager/terraform/extract.ts +++ b/lib/manager/terraform/extract.ts @@ -135,7 +135,7 @@ export function extractPackageFile(content: string): PackageFile | null { dep.skipReason = 'no-version'; } } else { - logger.info({ dep }, 'terraform dep has no source'); + logger.debug({ dep }, 'terraform dep has no source'); dep.skipReason = 'no-source'; } } else if ( diff --git a/lib/manager/terraform/update.ts b/lib/manager/terraform/update.ts index bb97be98e6dfb1ded0ccdc260243824abec4c7e6..2db00769490e3dc2106d19b39e2815060787909a 100644 --- a/lib/manager/terraform/update.ts +++ b/lib/manager/terraform/update.ts @@ -36,7 +36,7 @@ export function updateDependency({ lines[upgrade.managerData.lineNumber] = newLine; return lines.join('\n'); } catch (err) /* istanbul ignore next */ { - logger.info({ err }, 'Error setting new terraform module version'); + logger.debug({ err }, 'Error setting new terraform module version'); return null; } } diff --git a/lib/manager/travis/update.ts b/lib/manager/travis/update.ts index 192293582b615233b52752aff001460942fa1b5f..1c658128572622bf81843296b24e14696f99b1d7 100644 --- a/lib/manager/travis/update.ts +++ b/lib/manager/travis/update.ts @@ -26,7 +26,7 @@ export function updateDependency({ }); return fileContent.replace(/node_js:(\n\s+-[^\n]+)+\n/, newString); } catch (err) { - logger.info({ err }, 'Error setting new .travis.yml node versions'); + logger.debug({ err }, 'Error setting new .travis.yml node versions'); return null; } } diff --git a/lib/platform/azure/index.ts b/lib/platform/azure/index.ts index 4c36c567d11a6f6f8a4ed3b3e8f08e5e5d14f7da..3ef825b2851dbc9167ef5d27180466eb8a21bddb 100644 --- a/lib/platform/azure/index.ts +++ b/lib/platform/azure/index.ts @@ -78,7 +78,7 @@ export function initPlatform({ } export async function getRepos(): Promise<string[]> { - logger.info('Autodiscovering Azure DevOps repositories'); + logger.debug('Autodiscovering Azure DevOps repositories'); const azureApiGit = await azureApi.gitApi(); const repos = await azureApiGit.getRepositories(); return repos.map(repo => `${repo.project.name}/${repo.name}`); @@ -253,7 +253,7 @@ export async function getPrList(): Promise<Pr[]> { } while (fetchedPrs.length > 0); config.prList = prs.map(azureHelper.getRenovatePRFormat); - logger.info({ length: config.prList.length }, 'Retrieved Pull Requests'); + logger.debug({ length: config.prList.length }, 'Retrieved Pull Requests'); } return config.prList; } @@ -598,7 +598,7 @@ export function setBranchStatus({ } export async function mergePr(pr: number): Promise<void> { - logger.info(`mergePr(pr)(${pr}) - Not supported by Azure DevOps (yet!)`); + logger.debug(`mergePr(pr)(${pr}) - Not supported by Azure DevOps (yet!)`); await Promise.resolve(); } @@ -711,7 +711,7 @@ export async function addReviewers( prNo, obj.id ); - logger.info(`Reviewer added: ${obj.name}`); + logger.debug(`Reviewer added: ${obj.name}`); }) ); } @@ -727,7 +727,7 @@ export /* istanbul ignore next */ async function deleteLabel( // to become async? export function getPrFiles(prNo: number): string[] { - logger.info( + logger.debug( `getPrFiles(prNo)(${prNo}) - Not supported by Azure DevOps (yet!)` ); return []; diff --git a/lib/platform/bitbucket-server/index.ts b/lib/platform/bitbucket-server/index.ts index 41d90db1ea9986aeb68e136c97dffaa50a638c44..121a92d9c41d7f4941c4ec0fb157ecb68c4cd133 100644 --- a/lib/platform/bitbucket-server/index.ts +++ b/lib/platform/bitbucket-server/index.ts @@ -102,7 +102,7 @@ export function initPlatform({ // Get all repositories that the user has access to export async function getRepos(): Promise<string[]> { - logger.info('Autodiscovering Bitbucket Server repositories'); + logger.debug('Autodiscovering Bitbucket Server repositories'); try { const repos = await utils.accumulateValues( `./rest/api/1.0/repos?permission=REPO_WRITE&state=AVAILABLE` @@ -230,7 +230,7 @@ export async function initRepo({ if (err.statusCode === 404) { throw new Error(REPOSITORY_NOT_FOUND); } - logger.info({ err }, 'Unknown Bitbucket initRepo error'); + logger.debug({ err }, 'Unknown Bitbucket initRepo error'); throw err; } } @@ -387,7 +387,7 @@ export async function getPrList(_args?: any): Promise<Pr[]> { ); config.prList = values.map(utils.prInfo); - logger.info({ length: config.prList.length }, 'Retrieved Pull Requests'); + logger.debug({ length: config.prList.length }, 'Retrieved Pull Requests'); } else { logger.debug('returning cached PR list'); } @@ -612,7 +612,7 @@ export async function setBranchStatus({ if (existingStatus === state) { return; } - logger.info({ branch: branchName, context, state }, 'Setting branch status'); + logger.debug({ branch: branchName, context, state }, 'Setting branch status'); const branchCommit = await config.storage.getBranchCommit(branchName); @@ -847,13 +847,13 @@ export async function ensureComment({ } if (!commentId) { await addComment(number, body); - logger.info( + logger.debug( { repository: config.repository, prNo: number, topic }, 'Comment added' ); } else if (commentNeedsUpdating) { await editComment(number, commentId, body); - logger.info( + logger.debug( { repository: config.repository, prNo: number }, 'Comment updated' ); @@ -953,7 +953,7 @@ export async function createPr({ err.body.errors[0].exceptionName === 'com.atlassian.bitbucket.pull.EmptyPullRequestException' ) { - logger.info( + logger.debug( 'Empty pull request - deleting branch so it can be recreated next run' ); await deleteBranch(branchName); diff --git a/lib/platform/bitbucket/comments.ts b/lib/platform/bitbucket/comments.ts index cda6427189b571ee742649a533df748a4851ebba..3c038ecef049fca6a2f9a011b38350eda38acdcf 100644 --- a/lib/platform/bitbucket/comments.ts +++ b/lib/platform/bitbucket/comments.ts @@ -95,13 +95,13 @@ export async function ensureComment({ } if (!commentId) { await addComment(config, prNo, body); - logger.info( + logger.debug( { repository: config.repository, prNo, topic }, 'Comment added' ); } else if (commentNeedsUpdating) { await editComment(config, prNo, commentId, body); - logger.info({ repository: config.repository, prNo }, 'Comment updated'); + logger.debug({ repository: config.repository, prNo }, 'Comment updated'); } else { logger.debug('Comment is already update-to-date'); } diff --git a/lib/platform/bitbucket/index.ts b/lib/platform/bitbucket/index.ts index be122f60873c56192a17468dbf1fc419fff17850..6dd8bdf5e444aa0f5ed5e533ecef6118ef8a51fc 100644 --- a/lib/platform/bitbucket/index.ts +++ b/lib/platform/bitbucket/index.ts @@ -63,7 +63,7 @@ export function initPlatform({ // Get all repositories that the user has access to export async function getRepos(): Promise<string[]> { - logger.info('Autodiscovering Bitbucket Cloud repositories'); + logger.debug('Autodiscovering Bitbucket Cloud repositories'); try { const repos = await utils.accumulateValues<{ full_name: string }>( `/2.0/repositories/?role=contributor` @@ -131,7 +131,7 @@ export async function initRepo({ if (err.statusCode === 404) { throw new Error(REPOSITORY_NOT_FOUND); } - logger.info({ err }, 'Unknown Bitbucket initRepo error'); + logger.debug({ err }, 'Unknown Bitbucket initRepo error'); throw err; } @@ -228,7 +228,7 @@ export async function getPrList(): Promise<Pr[]> { url += utils.prStates.all.map(state => 'state=' + state).join('&'); const prs = await utils.accumulateValues(url, undefined, undefined, 50); config.prList = prs.map(utils.prInfo); - logger.info({ length: config.prList.length }, 'Retrieved Pull Requests'); + logger.debug({ length: config.prList.length }, 'Retrieved Pull Requests'); } return config.prList; } @@ -557,7 +557,7 @@ export async function ensureIssue({ /* istanbul ignore if */ if (!config.has_issues) { logger.warn('Issues are disabled - cannot ensureIssue'); - logger.info({ title }, 'Failed to ensure Issue'); + logger.debug({ title }, 'Failed to ensure Issue'); return null; } try { @@ -569,7 +569,7 @@ export async function ensureIssue({ } const [issue] = issues; if (String(issue.content.raw).trim() !== description.trim()) { - logger.info('Issue updated'); + logger.debug('Issue updated'); await api.put( `/2.0/repositories/${config.repository}/issues/${issue.id}`, { @@ -584,7 +584,7 @@ export async function ensureIssue({ return 'updated'; } } else { - logger.info('Issue created'); + logger.debug('Issue created'); await api.post(`/2.0/repositories/${config.repository}/issues`, { body: { title, @@ -595,7 +595,7 @@ export async function ensureIssue({ } } catch (err) /* istanbul ignore next */ { if (err.message.startsWith('Repository has no issue tracker.')) { - logger.info( + logger.debug( `Issues are disabled, so could not create issue: ${err.message}` ); } else { @@ -818,7 +818,7 @@ export async function mergePr( } ); delete config.baseCommitSHA; - logger.info('Automerging succeeded'); + logger.debug('Automerging succeeded'); } catch (err) /* istanbul ignore next */ { return false; } diff --git a/lib/platform/git/storage.ts b/lib/platform/git/storage.ts index 52070dc512a06b834a4e8929ea5f32f12e74146f..1fdf7ac26f62cde5169586443912805d03227f2c 100644 --- a/lib/platform/git/storage.ts +++ b/lib/platform/git/storage.ts @@ -131,7 +131,7 @@ export class Storage { // eslint-disable-next-line no-multi-assign const cwd = (this._cwd = config.localDir); this._config.branchExists = {}; - logger.info('Initialising git repository into ' + cwd); + logger.debug('Initializing git repository into ' + cwd); const gitHead = join(cwd, '.git/HEAD'); let clone = true; @@ -171,7 +171,7 @@ export class Storage { Math.round( 1 + 10 * convertHrtime(process.hrtime(fetchStart)).seconds ) / 10; - logger.info({ fetchSeconds }, 'git fetch completed'); + logger.debug({ fetchSeconds }, 'git fetch completed'); clone = false; } catch (err) /* istanbul ignore next */ { logger.error({ err }, 'git fetch error'); @@ -188,10 +188,10 @@ export class Storage { logger.debug({ err }, 'git clone error'); throw new Error(PLATFORM_FAILURE); } - const cloneSeconds = + const seconds = Math.round(1 + 10 * convertHrtime(process.hrtime(cloneStart)).seconds) / 10; - logger.info({ cloneSeconds }, 'git clone completed'); + logger.debug({ seconds }, 'git clone completed'); } const submodules = await this.getSubmodules(); for (const submodule of submodules) { @@ -221,7 +221,7 @@ export class Storage { } if (global.gitAuthor) { - logger.info({ gitAuthor: global.gitAuthor }, 'Setting git author'); + logger.debug({ gitAuthor: global.gitAuthor }, 'Setting git author'); try { await this._git.raw(['config', 'user.name', global.gitAuthor.name]); await this._git.raw(['config', 'user.email', global.gitAuthor.email]); @@ -459,7 +459,7 @@ export class Storage { if (branchName) { const exists = await this.branchExists(branchName); if (!exists) { - logger.info({ branchName }, 'branch no longer exists - aborting'); + logger.debug({ branchName }, 'branch no longer exists - aborting'); throw new Error(REPOSITORY_CHANGED); } } @@ -532,7 +532,7 @@ export class Storage { const commitRes = await this._git.commit(message); const commit = commitRes?.commit || 'unknown'; if (!(await this.hasDiff(`origin/${branchName}`))) { - logger.info( + logger.debug( { branchName, fileNames }, 'No file changes detected. Skipping commit' ); diff --git a/lib/platform/gitea/index.ts b/lib/platform/gitea/index.ts index 25f9e7e9b0175f6ece9bd1230c5e202b2df3db65..787d551091e206183b653ddf6f80247a42b8bfdd 100644 --- a/lib/platform/gitea/index.ts +++ b/lib/platform/gitea/index.ts @@ -200,7 +200,7 @@ const platform: Platform = { // Ensure endpoint contains trailing slash defaults.endpoint = endpoint.replace(/\/?$/, '/'); } else { - logger.info('Using default Gitea endpoint: ' + defaults.endpoint); + logger.debug('Using default Gitea endpoint: ' + defaults.endpoint); } api.setBaseUrl(defaults.endpoint); @@ -210,7 +210,10 @@ const platform: Platform = { gitAuthor = `${user.full_name || user.username} <${user.email}>`; botUserID = user.id; } catch (err) { - logger.info({ err }, 'Error authenticating with Gitea. Check your token'); + logger.debug( + { err }, + 'Error authenticating with Gitea. Check your token' + ); throw new Error('Init: Authentication failure'); } @@ -236,31 +239,31 @@ const platform: Platform = { try { repo = await helper.getRepo(repository); } catch (err) { - logger.info({ err }, 'Unknown Gitea initRepo error'); + logger.debug({ err }, 'Unknown Gitea initRepo error'); throw err; } // Ensure appropriate repository state and permissions if (repo.archived) { - logger.info( + logger.debug( 'Repository is archived - throwing error to abort renovation' ); throw new Error(REPOSITORY_ARCHIVED); } if (repo.mirror) { - logger.info( + logger.debug( 'Repository is a mirror - throwing error to abort renovation' ); throw new Error(REPOSITORY_MIRRORED); } if (!repo.permissions.pull || !repo.permissions.push) { - logger.info( + logger.debug( 'Repository does not permit pull and push - throwing error to abort renovation' ); throw new Error(REPOSITORY_ACCESS_FORBIDDEN); } if (repo.empty) { - logger.info('Repository is empty - throwing error to abort renovation'); + logger.debug('Repository is empty - throwing error to abort renovation'); throw new Error(REPOSITORY_EMPTY); } @@ -273,7 +276,7 @@ const platform: Platform = { } else if (repo.allow_merge_commits) { config.mergeMethod = 'merge'; } else { - logger.info( + logger.debug( 'Repository has no allowed merge methods - throwing error to abort renovation' ); throw new Error(REPOSITORY_BLOCKED); @@ -327,7 +330,7 @@ const platform: Platform = { }, async getRepos(): Promise<string[]> { - logger.info('Auto-discovering Gitea repositories'); + logger.debug('Auto-discovering Gitea repositories'); try { const repos = await helper.searchRepos({ uid: botUserID }); return repos.map(r => r.full_name); @@ -389,13 +392,13 @@ const platform: Platform = { ccs = await helper.getCombinedCommitStatus(config.repository, branchName); } catch (err) { if (err.statusCode === 404) { - logger.info( + logger.debug( 'Received 404 when checking branch status, assuming branch deletion' ); throw new Error(REPOSITORY_CHANGED); } - logger.info('Unknown error when checking branch status'); + logger.debug('Unknown error when checking branch status'); throw err; } @@ -552,14 +555,14 @@ const platform: Platform = { // If a valid PR was found, return and gracefully recover from the error. Otherwise, abort and throw error. if (pr) { if (pr.title !== title || pr.body !== body) { - logger.info( + logger.debug( `Recovered from 409 Conflict, but PR for ${branchName} is outdated. Updating...` ); await platform.updatePr(pr.number, title, body); pr.title = title; pr.body = body; } else { - logger.info( + logger.debug( `Recovered from 409 Conflict and PR for ${branchName} is up-to-date` ); } @@ -659,7 +662,7 @@ const platform: Platform = { return null; } if (shouldReOpen) { - logger.info('Reopening previously closed Issue'); + logger.debug('Reopening previously closed Issue'); } // Pick the last issue in the list as the active one @@ -676,14 +679,14 @@ const platform: Platform = { // Check if issue has already correct state if (activeIssue.body === body && activeIssue.state === 'open') { - logger.info( + logger.debug( `Issue #${activeIssue.number} is open and up to date - nothing to do` ); return null; } // Update issue body and re-open if enabled - logger.info(`Updating Issue #${activeIssue.number}`); + logger.debug(`Updating Issue #${activeIssue.number}`); await helper.updateIssue(config.repository, activeIssue.number, { body, state: shouldReOpen @@ -699,7 +702,7 @@ const platform: Platform = { body, title, }); - logger.info(`Created new Issue #${issue.number}`); + logger.debug(`Created new Issue #${issue.number}`); config.issueList = null; return 'created'; @@ -715,7 +718,7 @@ const platform: Platform = { const issueList = await platform.getIssueList(); for (const issue of issueList) { if (issue.state === 'open' && issue.title === title) { - logger.info({ number: issue.number }, 'Closing issue'); + logger.debug({ number: issue.number }, 'Closing issue'); await helper.closeIssue(config.repository, issue.number); } } @@ -743,7 +746,7 @@ const platform: Platform = { content, }: EnsureCommentConfig): Promise<boolean> { if (topic === 'Renovate Ignore Notification') { - logger.info( + logger.debug( `Skipping ensureComment(${topic}) as ignoring PRs is unsupported on Gitea.` ); return false; @@ -765,13 +768,13 @@ const platform: Platform = { // Create a new comment if no match has been found, otherwise update if necessary if (!comment) { const c = await helper.createComment(config.repository, issue, body); - logger.info( + logger.debug( { repository: config.repository, issue, comment: c.id }, 'Comment added' ); } else if (comment.body !== body) { const c = await helper.updateComment(config.repository, issue, body); - logger.info( + logger.debug( { repository: config.repository, issue, comment: c.id }, 'Comment updated' ); diff --git a/lib/platform/github/gh-got-wrapper.ts b/lib/platform/github/gh-got-wrapper.ts index 7105ec876810f0141db14e04a3083651ff8ffe19..132cf50baa184845fe983cfe18690a35ca06b51b 100644 --- a/lib/platform/github/gh-got-wrapper.ts +++ b/lib/platform/github/gh-got-wrapper.ts @@ -49,22 +49,22 @@ export function dispatchError( err.code === 'ETIMEDOUT' || err.code === 'EAI_AGAIN') ) { - logger.info({ err }, 'GitHub failure: RequestError'); + logger.debug({ err }, 'GitHub failure: RequestError'); throw new Error(PLATFORM_FAILURE); } if (err.name === 'ParseError') { - logger.info({ err }, 'GitHub failure: ParseError'); + logger.debug({ err }, 'GitHub failure: ParseError'); throw new Error(PLATFORM_FAILURE); } if (err.statusCode >= 500 && err.statusCode < 600) { - logger.info({ err }, 'GitHub failure: 5xx'); + logger.debug({ err }, 'GitHub failure: 5xx'); throw new Error(PLATFORM_FAILURE); } if ( err.statusCode === 403 && message.startsWith('You have triggered an abuse detection mechanism') ) { - logger.info({ err }, 'GitHub failure: abuse detection'); + logger.debug({ err }, 'GitHub failure: abuse detection'); throw new Error(PLATFORM_RATE_LIMIT_EXCEEDED); } if (err.statusCode === 403 && message.includes('Upgrade to GitHub Pro')) { @@ -72,14 +72,14 @@ export function dispatchError( throw err; } if (err.statusCode === 403 && message.includes('rate limit exceeded')) { - logger.info({ err }, 'GitHub failure: rate limit'); + logger.debug({ err }, 'GitHub failure: rate limit'); throw new Error(PLATFORM_RATE_LIMIT_EXCEEDED); } if ( err.statusCode === 403 && message.startsWith('Resource not accessible by integration') ) { - logger.info( + logger.debug( { err }, 'GitHub failure: Resource not accessible by integration' ); @@ -87,7 +87,7 @@ export function dispatchError( } if (err.statusCode === 401 && message.includes('Bad credentials')) { const rateLimit = err.headers ? err.headers['x-ratelimit-limit'] : -1; - logger.info( + logger.debug( { token: maskToken(opts.token), err, @@ -185,10 +185,10 @@ async function get( const goodResult = '{"data":{'; if (result.body.startsWith(goodResult)) { if (!okToRetry) { - logger.info('Recovered graphql query'); + logger.debug('Recovered graphql query'); } } else if (okToRetry) { - logger.info('Retrying graphql query'); + logger.debug('Retrying graphql query'); opts.body = opts.body.replace('first: 100', 'first: 25'); return get(path, opts, !okToRetry); } diff --git a/lib/platform/github/index.ts b/lib/platform/github/index.ts index 0a45fa463babe3ef0c7152525374ba7247f74370..895545f37047686697003da3b25be9e83fd14703 100644 --- a/lib/platform/github/index.ts +++ b/lib/platform/github/index.ts @@ -123,7 +123,7 @@ export async function initPlatform({ defaults.endpoint = endpoint.replace(/\/?$/, '/'); // always add a trailing slash api.setBaseUrl(defaults.endpoint); } else { - logger.info('Using default github endpoint: ' + defaults.endpoint); + logger.debug('Using default github endpoint: ' + defaults.endpoint); } let gitAuthor: string; let renovateUsername: string; @@ -157,7 +157,7 @@ export async function initPlatform({ ); gitAuthor = undefined; } - logger.info('Authenticated as GitHub user: ' + renovateUsername); + logger.debug('Authenticated as GitHub user: ' + renovateUsername); const platformConfig: PlatformConfig = { endpoint: defaults.endpoint, gitAuthor, @@ -168,7 +168,7 @@ export async function initPlatform({ // Get all repositories that the user has access to export async function getRepos(): Promise<string[]> { - logger.info('Autodiscovering GitHub repositories'); + logger.debug('Autodiscovering GitHub repositories'); try { const res = await api.get('user/repos?per_page=100', { paginate: true }); return res.body.map((repo: { full_name: string }) => repo.full_name); @@ -285,14 +285,14 @@ export async function initRepo({ } } if (res.body.full_name && res.body.full_name !== repository) { - logger.info( + logger.debug( { repository, this_repository: res.body.full_name }, 'Repository has been renamed' ); throw new Error(REPOSITORY_RENAMED); } if (res.body.archived) { - logger.info( + logger.debug( 'Repository is archived - throwing error to abort renovation' ); throw new Error(REPOSITORY_ARCHIVED); @@ -333,7 +333,7 @@ export async function initRepo({ config.mergeMethod = 'merge'; } else { // This happens if we don't have Administrator read access, it is not a critical error - logger.info('Could not find allowed merge methods for repo'); + logger.debug('Could not find allowed merge methods for repo'); } } catch (err) /* istanbul ignore next */ { logger.debug('Caught initRepo error'); @@ -361,7 +361,7 @@ export async function initRepo({ if (err.message === 'Response code 451 (Unavailable for Legal Reasons)') { throw new Error(REPOSITORY_ACCESS_FORBIDDEN); } - logger.info({ err }, 'Unknown GitHub initRepo error'); + logger.debug({ err }, 'Unknown GitHub initRepo error'); throw err; } // This shouldn't be necessary, but occasional strange errors happened until it was added @@ -372,7 +372,7 @@ export async function initRepo({ config.forkMode = !!forkMode; if (forkMode) { - logger.info('Bot is in forkMode'); + logger.debug('Bot is in forkMode'); config.forkToken = forkToken; // Save parent SHA then delete const parentSha = await getBaseCommitSHA(); @@ -394,11 +394,11 @@ export async function initRepo({ }) ).body.full_name; } catch (err) /* istanbul ignore next */ { - logger.info({ err }, 'Error forking repository'); + logger.debug({ err }, 'Error forking repository'); throw new Error(REPOSITORY_CANNOT_FORK); } if (existingRepos.includes(config.repository)) { - logger.info( + logger.debug( { repository_fork: config.repository }, 'Found existing fork' ); @@ -432,7 +432,7 @@ export async function initRepo({ } } } else { - logger.info({ repository_fork: config.repository }, 'Created fork'); + logger.debug({ repository_fork: config.repository }, 'Created fork'); // Wait an arbitrary 30s to hopefully give GitHub enough time for forking to complete await delay(30000); } @@ -582,7 +582,7 @@ export function getRepoStatus(): Promise<StatusResult> { // istanbul ignore next export function mergeBranch(branchName: string): Promise<void> { if (config.pushProtection) { - logger.info( + logger.debug( { branch: branchName }, 'Branch protection: Attempting to merge branch when push protection is enabled' ); @@ -645,7 +645,7 @@ async function getClosedPrs(): Promise<PrList> { const prNumbers: number[] = []; // istanbul ignore if if (!res.data) { - logger.info( + logger.debug( { query, res }, 'No graphql res.data, returning empty list' ); @@ -750,7 +750,7 @@ async function getOpenPrs(): Promise<PrList> { const prNumbers: number[] = []; // istanbul ignore if if (!res.data) { - logger.info({ query, res }, 'No graphql res.data'); + logger.debug({ query, res }, 'No graphql res.data'); return {}; } for (const pr of res.data.repository.pullRequests.nodes) { @@ -865,7 +865,7 @@ export async function getPr(prNo: number): Promise<Pr | null> { logger.debug('Returning from graphql closed PR list'); return closedPr; } - logger.info( + logger.debug( { prNo }, 'PR not found in open or closed PRs list - trying to fetch it directly' ); @@ -993,7 +993,7 @@ export async function getPrList(): Promise<Pr[]> { { paginate: true } ); } catch (err) /* istanbul ignore next */ { - logger.info({ err }, 'getPrList err'); + logger.debug({ err }, 'getPrList err'); throw new Error('platform-failure'); } config.prList = res.body.map( @@ -1096,12 +1096,12 @@ export async function getBranchStatus( commitStatus = await getStatus(branchName); } catch (err) /* istanbul ignore next */ { if (err.statusCode === 404) { - logger.info( + logger.debug( 'Received 404 when checking branch status, assuming that branch has been deleted' ); throw new Error(REPOSITORY_CHANGED); } - logger.info('Unknown error when checking branch status'); + logger.debug('Unknown error when checking branch status'); throw err; } logger.debug( @@ -1141,7 +1141,7 @@ export async function getBranchStatus( err.statusCode === 403 || err.message === PLATFORM_INTEGRATION_UNAUTHORIZED ) { - logger.info('No permission to view check runs'); + logger.debug('No permission to view check runs'); } else { logger.warn({ err }, 'Error retrieving check runs'); } @@ -1190,7 +1190,7 @@ export async function getBranchStatusCheck( return null; } catch (err) /* istanbul ignore next */ { if (err.statusCode === 404) { - logger.info('Commit not found when checking statuses'); + logger.debug('Commit not found when checking statuses'); throw new Error(REPOSITORY_CHANGED); } throw err; @@ -1206,14 +1206,14 @@ export async function setBranchStatus({ }: BranchStatusConfig): Promise<void> { // istanbul ignore if if (config.parentRepo) { - logger.info('Cannot set branch status when in forking mode'); + logger.debug('Cannot set branch status when in forking mode'); return; } const existingStatus = await getBranchStatusCheck(branchName, context); if (existingStatus === state) { return; } - logger.info({ branch: branchName, context, state }, 'Setting branch status'); + logger.debug({ branch: branchName, context, state }, 'Setting branch status'); try { const branchCommit = await config.storage.getBranchCommit(branchName); const url = `repos/${config.repository}/statuses/${branchCommit}`; @@ -1231,7 +1231,7 @@ export async function setBranchStatus({ await getStatus(branchName, false); await getStatusCheck(branchName, false); } catch (err) /* istanbul ignore next */ { - logger.info({ err }, 'Caught error setting branch status - aborting'); + logger.debug({ err }, 'Caught error setting branch status - aborting'); throw new Error(REPOSITORY_CHANGED); } } @@ -1360,7 +1360,7 @@ export async function ensureIssue({ return null; } if (shouldReOpen) { - logger.info('Reopening previously closed issue'); + logger.debug('Reopening previously closed issue'); } issue = issues[issues.length - 1]; } @@ -1378,11 +1378,11 @@ export async function ensureIssue({ ) ).body.body; if (issueBody === body && issue.state === 'open') { - logger.info('Issue is open and up to date - nothing to do'); + logger.debug('Issue is open and up to date - nothing to do'); return null; } if (shouldReOpen) { - logger.info('Patching issue'); + logger.debug('Patching issue'); await api.patch( `repos/${config.parentRepo || config.repository}/issues/${ issue.number @@ -1391,7 +1391,7 @@ export async function ensureIssue({ body: { body, state: 'open' }, } ); - logger.info('Issue updated'); + logger.debug('Issue updated'); return 'updated'; } } @@ -1401,7 +1401,7 @@ export async function ensureIssue({ body, }, }); - logger.info('Issue created'); + logger.debug('Issue created'); // reset issueList so that it will be fetched again as-needed delete config.issueList; return 'created'; @@ -1411,7 +1411,7 @@ export async function ensureIssue({ err.body.message && err.body.message.startsWith('Issues are disabled for this repo') ) { - logger.info( + logger.debug( `Issues are disabled, so could not create issue: ${err.message}` ); } else { @@ -1427,7 +1427,7 @@ export async function ensureIssueClosing(title: string): Promise<void> { for (const issue of issueList) { if (issue.state === 'open' && issue.title === title) { await closeIssue(issue.number); - logger.info({ number: issue.number }, 'Issue closed'); + logger.debug({ number: issue.number }, 'Issue closed'); } } } @@ -1586,13 +1586,13 @@ export async function ensureComment({ } if (!commentId) { await addComment(number, body); - logger.info( + logger.debug( { repository: config.repository, issueNo: number, topic }, 'Comment added' ); } else if (commentNeedsUpdating) { await editComment(commentId, body); - logger.info( + logger.debug( { repository: config.repository, issueNo: number }, 'Comment updated' ); @@ -1607,7 +1607,7 @@ export async function ensureComment({ if ( err.message === 'Unable to create comment because issue is locked. (403)' ) { - logger.info('Issue is locked - cannot add comment'); + logger.debug('Issue is locked - cannot add comment'); } else { logger.warn({ err }, 'Error ensuring comment'); } @@ -1746,7 +1746,7 @@ export async function mergePr( logger.debug(`mergePr(${prNo}, ${branchName})`); // istanbul ignore if if (config.isGhe && config.pushProtection) { - logger.info( + logger.debug( { branch: branchName, prNo }, 'Branch protection: Cannot automerge PR when push protection is enabled' ); @@ -1764,7 +1764,7 @@ export async function mergePr( (review: { state: string }) => review.state === 'APPROVED' ); if (!isApproved) { - logger.info( + logger.debug( { branch: branchName, prNo }, 'Branch protection: Cannot automerge PR until there is an approving review' ); @@ -1788,7 +1788,7 @@ export async function mergePr( } catch (err) { if (err.statusCode === 404 || err.statusCode === 405) { // istanbul ignore next - logger.info( + logger.debug( { response: err.response ? err.response.body : undefined }, 'GitHub blocking PR merge -- will keep trying' ); @@ -1905,13 +1905,13 @@ export async function getVulnerabilityAlerts(): Promise<VulnerabilityAlert[]> { (edge: { node: any }) => edge.node ); if (alerts.length) { - logger.info({ alerts }, 'Found GitHub vulnerability alerts'); + logger.debug({ alerts }, 'Found GitHub vulnerability alerts'); } } else { logger.debug('Cannot read vulnerability alerts'); } } catch (err) { - logger.info({ err }, 'Error retrieving vulnerability alerts'); + logger.debug({ err }, 'Error retrieving vulnerability alerts'); } return alerts; } diff --git a/lib/platform/gitlab/index.ts b/lib/platform/gitlab/index.ts index a6f8763e46c1d0d19ca54fec816889acac77f949..2aebab7e83403cf6c3447cf7963e84133ce18b3a 100644 --- a/lib/platform/gitlab/index.ts +++ b/lib/platform/gitlab/index.ts @@ -76,7 +76,7 @@ export async function initPlatform({ defaults.endpoint = endpoint.replace(/\/?$/, '/'); // always add a trailing slash api.setBaseUrl(defaults.endpoint); } else { - logger.info('Using default GitLab endpoint: ' + defaults.endpoint); + logger.debug('Using default GitLab endpoint: ' + defaults.endpoint); } let gitAuthor: string; try { @@ -84,7 +84,7 @@ export async function initPlatform({ gitAuthor = `${user.name} <${user.email}>`; authorId = user.id; } catch (err) { - logger.info( + logger.debug( { err }, 'Error authenticating with GitLab. Check that your token includes "user" permissions' ); @@ -99,11 +99,11 @@ export async function initPlatform({ // Get all repositories that the user has access to export async function getRepos(): Promise<string[]> { - logger.info('Autodiscovering GitLab repositories'); + logger.debug('Autodiscovering GitLab repositories'); try { const url = `projects?membership=true&per_page=100&with_merge_requests_enabled=true`; const res = await api.get(url, { paginate: true }); - logger.info(`Discovered ${res.body.length} project(s)`); + logger.debug(`Discovered ${res.body.length} project(s)`); return res.body.map( (repo: { path_with_namespace: string }) => repo.path_with_namespace ); @@ -150,25 +150,25 @@ export async function initRepo({ try { res = await api.get(`projects/${config.repository}`); if (res.body.archived) { - logger.info( + logger.debug( 'Repository is archived - throwing error to abort renovation' ); throw new Error(REPOSITORY_ARCHIVED); } if (res.body.mirror) { - logger.info( + logger.debug( 'Repository is a mirror - throwing error to abort renovation' ); throw new Error(REPOSITORY_MIRRORED); } if (res.body.repository_access_level === 'disabled') { - logger.info( + logger.debug( 'Repository portion of project is disabled - throwing error to abort renovation' ); throw new Error(REPOSITORY_DISABLED); } if (res.body.merge_requests_access_level === 'disabled') { - logger.info( + logger.debug( 'MRs are disabled for the project - throwing error to abort renovation' ); throw new Error(REPOSITORY_DISABLED); @@ -249,7 +249,7 @@ export async function initRepo({ if (err.message === REPOSITORY_DISABLED) { throw err; } - logger.info({ err }, 'Unknown GitLab initRepo error'); + logger.debug({ err }, 'Unknown GitLab initRepo error'); throw err; } const repoConfig: RepoConfig = { @@ -501,15 +501,15 @@ export async function mergePr(iid: number): Promise<boolean> { return true; } catch (err) /* istanbul ignore next */ { if (err.statusCode === 401) { - logger.info('No permissions to merge PR'); + logger.debug('No permissions to merge PR'); return false; } if (err.statusCode === 406) { - logger.info('PR not acceptable for merging'); + logger.debug('PR not acceptable for merging'); return false; } logger.debug({ err }, 'merge PR error'); - logger.info('PR merge failed'); + logger.debug('PR merge failed'); return false; } } @@ -660,7 +660,7 @@ export async function setBranchStatus({ ) ) { // https://gitlab.com/gitlab-org/gitlab-foss/issues/25807 - logger.info('Ignoring status transition error'); + logger.debug('Ignoring status transition error'); } else { logger.debug({ err }); logger.warn('Failed to set branch status'); @@ -745,7 +745,7 @@ export async function ensureIssue({ } } catch (err) /* istanbul ignore next */ { if (err.message.startsWith('Issues are disabled for this repo')) { - logger.info(`Could not create issue: ${err.message}`); + logger.debug(`Could not create issue: ${err.message}`); } else { logger.warn({ err }, 'Could not ensure issue'); } @@ -758,7 +758,7 @@ export async function ensureIssueClosing(title: string): Promise<void> { const issueList = await getIssueList(); for (const issue of issueList) { if (issue.title === title) { - logger.info({ issue }, 'Closing issue'); + logger.debug({ issue }, 'Closing issue'); await api.put(`projects/${config.repository}/issues/${issue.iid}`, { body: { state_event: 'close' }, }); @@ -895,13 +895,13 @@ export async function ensureComment({ } if (!commentId) { await addComment(number, body); - logger.info( + logger.debug( { repository: config.repository, issueNo: number }, 'Added comment' ); } else if (commentNeedsUpdating) { await editComment(number, commentId, body); - logger.info( + logger.debug( { repository: config.repository, issueNo: number }, 'Updated comment' ); diff --git a/lib/platform/index.ts b/lib/platform/index.ts index f13da5e1baeae235d5c23d6efff9478e55716a65..38896f7b18f280f95cf18788405b4c25e48ccc97 100644 --- a/lib/platform/index.ts +++ b/lib/platform/index.ts @@ -49,13 +49,13 @@ export async function initPlatform( const returnConfig: any = { ...config, ...platformInfo }; let gitAuthor: string; if (config && config.gitAuthor) { - logger.info(`Using configured gitAuthor (${config.gitAuthor})`); + logger.debug(`Using configured gitAuthor (${config.gitAuthor})`); gitAuthor = config.gitAuthor; } else if (!(platformInfo && platformInfo.gitAuthor)) { - logger.info('Using default gitAuthor: Renovate Bot <bot@renovateapp.com>'); + logger.debug('Using default gitAuthor: Renovate Bot <bot@renovateapp.com>'); gitAuthor = 'Renovate Bot <bot@renovateapp.com>'; } /* istanbul ignore next */ else { - logger.info('Using platform gitAuthor: ' + platformInfo.gitAuthor); + logger.debug('Using platform gitAuthor: ' + platformInfo.gitAuthor); gitAuthor = platformInfo.gitAuthor; } let gitAuthorParsed: addrs.ParsedMailbox | null = null; diff --git a/lib/util/ignore.ts b/lib/util/ignore.ts index d0d69042940866782de32016918be13e034f8313..b1ffcdf29b09c7087b5c43d479bb40be5f0990e6 100644 --- a/lib/util/ignore.ts +++ b/lib/util/ignore.ts @@ -9,7 +9,7 @@ export function isSkipComment(comment?: string): boolean { if (command === 'ignore') { return true; } - logger.info('Unknown comment command: ' + command); + logger.debug('Unknown comment command: ' + command); } return false; } diff --git a/lib/util/package-rules.ts b/lib/util/package-rules.ts index 4c2bcd0d8a43a23c2d8ac15978d85d9ddfc78d99..533068aef2f7856e3b1a0ed826ee640776015138 100644 --- a/lib/util/package-rules.ts +++ b/lib/util/package-rules.ts @@ -221,7 +221,7 @@ function matchesRule(inputConfig: Config, packageRule: PackageRule): boolean { return false; } } else { - logger.info( + logger.debug( { matchCurrentVersionStr, currentValue }, 'Could not find a version to compare' ); diff --git a/lib/versioning/pep440/range.ts b/lib/versioning/pep440/range.ts index c7145161143fc13c259ba74fd9b2d21adbc6912f..03d81350047a101ae1f8f62c2ce0ac1c2f26f99b 100644 --- a/lib/versioning/pep440/range.ts +++ b/lib/versioning/pep440/range.ts @@ -62,7 +62,7 @@ export function getNewValue({ } } if (!['replace', 'bump'].includes(rangeStrategy)) { - logger.info( + logger.debug( 'Unsupported rangeStrategy: ' + rangeStrategy + '. Using "replace" instead.' diff --git a/lib/workers/branch/automerge.ts b/lib/workers/branch/automerge.ts index 65385b81a1718f9bc572da7a1813406072aad1b4..890676d7d17380b238f10cb98fde1d0dba216ea2 100644 --- a/lib/workers/branch/automerge.ts +++ b/lib/workers/branch/automerge.ts @@ -41,7 +41,7 @@ export async function tryBranchAutomerge( } catch (err) { // istanbul ignore if if (err.message === 'not ready') { - logger.info('Branch is not ready for automerge'); + logger.debug('Branch is not ready for automerge'); return 'not ready'; } logger.info({ err }, `Failed to automerge branch`); diff --git a/lib/workers/branch/get-updated.ts b/lib/workers/branch/get-updated.ts index 668a3dee9293f70e81c90251e33259e0e64a3f91..3cb3c37b9763e49234523f4e738a85bc70828088 100644 --- a/lib/workers/branch/get-updated.ts +++ b/lib/workers/branch/get-updated.ts @@ -39,7 +39,7 @@ export async function getUpdatedPackageFiles( (await platform.getFile(packageFile, config.parentBranch)); // istanbul ignore if if (config.parentBranch && !existingContent) { - logger.info('Rebasing branch after file not found'); + logger.debug('Rebasing branch after file not found'); return getUpdatedPackageFiles({ ...config, parentBranch: undefined, @@ -73,7 +73,7 @@ export async function getUpdatedPackageFiles( }); if (!newContent) { if (config.parentBranch) { - logger.info('Rebasing branch after error updating content'); + logger.debug('Rebasing branch after error updating content'); return getUpdatedPackageFiles({ ...config, parentBranch: undefined, @@ -88,7 +88,7 @@ export async function getUpdatedPackageFiles( if (newContent !== existingContent) { if (config.parentBranch) { // This ensure it's always 1 commit from the bot - logger.info('Need to update package file so will rebase first'); + logger.debug('Need to update package file so will rebase first'); return getUpdatedPackageFiles({ ...config, parentBranch: undefined, diff --git a/lib/workers/branch/index.ts b/lib/workers/branch/index.ts index 69226129473b833cc74432f4fa252aa3935b8786..d586612c1339441449bd257bc4a76833cfe6576c 100644 --- a/lib/workers/branch/index.ts +++ b/lib/workers/branch/index.ts @@ -83,7 +83,9 @@ export async function processBranch( const masterIssueCheck = (config.masterIssueChecks || {})[config.branchName]; // istanbul ignore if if (masterIssueCheck) { - logger.info('Branch has been checked in master issue: ' + masterIssueCheck); + logger.debug( + 'Branch has been checked in master issue: ' + masterIssueCheck + ); } if (branchPr) { config.rebaseRequested = rebaseCheck(config, branchPr); @@ -143,9 +145,9 @@ export async function processBranch( // istanbul ignore if if (!branchExists && config.masterIssueApproval) { if (masterIssueCheck) { - logger.info(`Branch ${config.branchName} is approved for creation`); + logger.debug(`Branch ${config.branchName} is approved for creation`); } else { - logger.info(`Branch ${config.branchName} needs approval`); + logger.debug(`Branch ${config.branchName} needs approval`); return 'needs-approval'; } } @@ -155,7 +157,7 @@ export async function processBranch( !masterIssueCheck && !config.vulnerabilityAlert ) { - logger.info( + logger.debug( 'Reached PR creation limit or per run commits limit - skipping branch creation' ); return 'pr-hourly-limit-reached'; @@ -165,7 +167,7 @@ export async function processBranch( if (branchPr) { logger.debug('Found existing branch PR'); if (branchPr.state !== 'open') { - logger.info( + logger.debug( 'PR has been closed or merged since this run started - aborting' ); throw new Error(REPOSITORY_CHANGED); @@ -213,7 +215,7 @@ export async function processBranch( config.isScheduledNow = isScheduledNow(config); if (!config.isScheduledNow && !masterIssueCheck) { if (!branchExists) { - logger.info('Skipping branch creation as not within schedule'); + logger.debug('Skipping branch creation as not within schedule'); return 'not-scheduled'; } if (config.updateNotScheduled === false && !config.rebaseRequested) { @@ -237,7 +239,7 @@ export async function processBranch( (config.prCreation === 'not-pending' || /* istanbul ignore next */ config.prCreation === 'status-success') ) { - logger.info( + logger.debug( 'Skipping branch creation due to unpublishSafe + status checks' ); return 'pending'; @@ -280,14 +282,14 @@ export async function processBranch( config.stabilityStatus === 'pending' && ['not-pending', 'status-success'].includes(config.prCreation) ) { - logger.info('Skipping branch creation due to stability days not met'); + logger.debug('Skipping branch creation due to stability days not met'); return 'pending'; } } // istanbul ignore if if (masterIssueCheck === 'rebase' || config.masterIssueRebaseAllOpen) { - logger.info('Manual rebase requested via master issue'); + logger.debug('Manual rebase requested via master issue'); delete config.parentBranch; } else { Object.assign(config, await getParentBranch(config)); @@ -407,13 +409,15 @@ export async function processBranch( logger.debug(`Branch timestamp: ` + config.releaseTimestamp); const releaseTimestamp = DateTime.fromISO(config.releaseTimestamp); if (releaseTimestamp.plus({ days: 1 }) < DateTime.local()) { - logger.info('PR is older than a day, raise PR with lock file errors'); + logger.debug( + 'PR is older than a day, raise PR with lock file errors' + ); } else if (branchExists) { - logger.info( + logger.debug( 'PR is less than a day old but branchExists so updating anyway' ); } else { - logger.info('PR is less than a day old - raise error instead of PR'); + logger.debug('PR is less than a day old - raise error instead of PR'); throw new Error(MANAGER_LOCKFILE_ERROR); } } else { @@ -462,7 +466,7 @@ export async function processBranch( mergeStatus === 'branch status error' || mergeStatus === 'failed' ) { - logger.info({ mergeStatus }, 'Branch automerge not possible'); + logger.debug({ mergeStatus }, 'Branch automerge not possible'); config.forcePr = true; config.branchAutomergeFailureMessage = mergeStatus; } diff --git a/lib/workers/branch/parent.ts b/lib/workers/branch/parent.ts index 62e6323aa0ed8791538afb8354a2ae55088979fb..9fac43d5803a01fdd3371342c30ab1617a8b561a 100644 --- a/lib/workers/branch/parent.ts +++ b/lib/workers/branch/parent.ts @@ -11,7 +11,7 @@ export async function getParentBranch( // Check if branch exists const branchExists = await platform.branchExists(branchName); if (!branchExists) { - logger.info(`Branch needs creating`); + logger.debug(`Branch needs creating`); return { parentBranch: undefined }; } logger.debug(`Branch already exists`); @@ -21,15 +21,15 @@ export async function getParentBranch( if (pr) { if (pr.title && pr.title.startsWith('rebase!')) { - logger.info('Manual rebase requested via PR title for #' + pr.number); + logger.debug('Manual rebase requested via PR title for #' + pr.number); return { parentBranch: undefined }; } if (pr.body && pr.body.includes(`- [x] <!-- rebase-check -->`)) { - logger.info('Manual rebase requested via PR checkbox for #' + pr.number); + logger.debug('Manual rebase requested via PR checkbox for #' + pr.number); return { parentBranch: undefined }; } if (pr.labels && pr.labels.includes(config.rebaseLabel)) { - logger.info('Manual rebase requested via PR labels for #' + pr.number); + logger.debug('Manual rebase requested via PR labels for #' + pr.number); // istanbul ignore if if (config.dryRun) { logger.info( @@ -49,13 +49,13 @@ export async function getParentBranch( ) { const isBranchStale = await platform.isBranchStale(branchName); if (isBranchStale) { - logger.info(`Branch is stale and needs rebasing`); + logger.debug(`Branch is stale and needs rebasing`); // We can rebase the branch only if no PR or PR can be rebased if (!pr || !pr.isModified) { return { parentBranch: undefined }; } // TODO: Warn here so that it appears in PR body - logger.info('Cannot rebase branch'); + logger.debug('Cannot rebase branch'); return { parentBranch: branchName, isModified: true }; } } @@ -65,9 +65,9 @@ export async function getParentBranch( logger.debug('PR is conflicted'); if (!pr.isModified) { - logger.info(`Branch is not mergeable and needs rebasing`); + logger.debug(`Branch is not mergeable and needs rebasing`); if (config.rebaseWhen === 'never') { - logger.info('Rebasing disabled by config'); + logger.debug('Rebasing disabled by config'); return { parentBranch: branchName, isModified: false }; } // Setting parentBranch back to undefined means that we'll use the default branch @@ -75,7 +75,7 @@ export async function getParentBranch( } // Don't do anything different, but warn // TODO: Add warning to PR - logger.info(`Branch is not mergeable but can't be rebased`); + logger.debug(`Branch is not mergeable but can't be rebased`); } logger.debug(`Branch does not need rebasing`); return { parentBranch: branchName, isModified: false }; diff --git a/lib/workers/global/autodiscover.ts b/lib/workers/global/autodiscover.ts index becb8c8b394de7f408fb65f86089b8d4a822718a..8e3de49cf7ed441729e61a5a6ee7ab182633316b 100644 --- a/lib/workers/global/autodiscover.ts +++ b/lib/workers/global/autodiscover.ts @@ -24,7 +24,7 @@ export async function autodiscoverRepositories( let discovered = await platform.getRepos(); if (!(discovered && discovered.length)) { // Soft fail (no error thrown) if no accessible repositories - logger.info( + logger.debug( 'The account associated with your token does not have access to any repos' ); return config; @@ -33,11 +33,11 @@ export async function autodiscoverRepositories( discovered = discovered.filter(minimatch.filter(config.autodiscoverFilter)); if (!discovered.length) { // Soft fail (no error thrown) if no accessible repositories match the filter - logger.info('None of the discovered repositories matched the filter'); + logger.debug('None of the discovered repositories matched the filter'); return config; } } - logger.info(`Discovered ${discovered.length} repositories`); + logger.debug(`Discovered ${discovered.length} repositories`); // istanbul ignore if if (config.repositories && config.repositories.length) { logger.debug( diff --git a/lib/workers/global/index.ts b/lib/workers/global/index.ts index 409b7e255a204fe3bc5445dccdd9c8f6d01371b4..9131e7e461e1bb4b8bf8691168fbcff70add72ad 100644 --- a/lib/workers/global/index.ts +++ b/lib/workers/global/index.ts @@ -71,7 +71,7 @@ export async function start(): Promise<0 | 1> { // Iterate through repositories sequentially for (const repository of config.repositories) { if (limits.getLimitRemaining('prCommitsPerRunLimit') <= 0) { - logger.info( + logger.debug( 'Max commits created for this run. Skipping all remaining repositories.' ); break; @@ -87,7 +87,7 @@ export async function start(): Promise<0 | 1> { } setMeta({}); printStats(); - logger.info(`Renovate finished`); + logger.debug(`Renovate existing successfully`); } catch (err) /* istanbul ignore next */ { if (err.message.startsWith('Init: ')) { logger.fatal(err.message.substring(6)); diff --git a/lib/workers/pr/changelog/release-notes.ts b/lib/workers/pr/changelog/release-notes.ts index 6585d3865c77139c3617c94303fa3814c6425ad9..89a5fda8c6b1ef9dabc0b415bffb0bbeb986c1a7 100644 --- a/lib/workers/pr/changelog/release-notes.ts +++ b/lib/workers/pr/changelog/release-notes.ts @@ -159,7 +159,7 @@ export async function getReleaseNotesMd( [changelogFile] = files; /* istanbul ignore if */ if (files.length > 1) { - logger.info( + logger.debug( `Multiple candidates for changelog file, using ${changelogFile}` ); } diff --git a/lib/workers/pr/changelog/releases.ts b/lib/workers/pr/changelog/releases.ts index e041eab99ce5b3eddc67193d00b365e1833d53ed..8c991376c527e74758ec8f2ac1ef4f714eabaa50 100644 --- a/lib/workers/pr/changelog/releases.ts +++ b/lib/workers/pr/changelog/releases.ts @@ -55,7 +55,7 @@ export async function getReleases( return releases; } catch (err) /* istanbul ignore next */ { logger.debug({ err }, 'getReleases err'); - logger.info({ datasource, depName }, 'Error getting releases'); + logger.debug({ datasource, depName }, 'Error getting releases'); return null; } } diff --git a/lib/workers/pr/changelog/source-github.ts b/lib/workers/pr/changelog/source-github.ts index f6e7ac261336ef5028bf8f94b5f432f17ef557e6..a595ff127eed78c02164c41e510dbe32a4d4b304 100644 --- a/lib/workers/pr/changelog/source-github.ts +++ b/lib/workers/pr/changelog/source-github.ts @@ -37,7 +37,7 @@ async function getTags( return tags.map(tag => tag.name).filter(Boolean); } catch (err) { - logger.info({ sourceRepo: repository }, 'Failed to fetch Github tags'); + logger.debug({ sourceRepo: repository }, 'Failed to fetch Github tags'); logger.debug({ err }); // istanbul ignore if if (err.message && err.message.includes('Bad credentials')) { @@ -81,7 +81,7 @@ export async function getChangeLogJSON({ ); return { error: ChangeLogError.MissingGithubToken }; } - logger.info( + logger.debug( { manager, depName, sourceUrl }, 'Repository URL does not match any known hosts - skipping changelog retrieval' ); @@ -92,7 +92,7 @@ export async function getChangeLogJSON({ : endpoint; // TODO FIX const repository = pathname.slice(1).replace(/\/$/, ''); if (repository.split('/').length !== 2) { - logger.info({ sourceUrl }, 'Invalid github URL found'); + logger.debug({ sourceUrl }, 'Invalid github URL found'); return null; } if (!(releases && releases.length)) { diff --git a/lib/workers/pr/index.ts b/lib/workers/pr/index.ts index 4559a2a5cc398535387658a29846f5f02fdc7dc0..8abad5b27179b98d66374b44c74cd99b28a2b870 100644 --- a/lib/workers/pr/index.ts +++ b/lib/workers/pr/index.ts @@ -41,10 +41,10 @@ async function addAssigneesReviewers(config, pr: Pr): Promise<void> { logger.info('DRY-RUN: Would add assignees to PR #' + pr.number); } else { await platform.addAssignees(pr.number, assignees); - logger.info({ assignees }, 'Added assignees'); + logger.debug({ assignees }, 'Added assignees'); } } catch (err) { - logger.info( + logger.debug( { assignees: config.assignees, err }, 'Failed to add assignees' ); @@ -67,10 +67,10 @@ async function addAssigneesReviewers(config, pr: Pr): Promise<void> { logger.info('DRY-RUN: Would add reviewers to PR #' + pr.number); } else { await platform.addReviewers(pr.number, reviewers); - logger.info({ reviewers }, 'Added reviewers'); + logger.debug({ reviewers }, 'Added reviewers'); } } catch (err) { - logger.info( + logger.debug( { reviewers: config.reviewers, err }, 'Failed to add reviewers' ); @@ -136,7 +136,7 @@ export async function ensurePr( (currentTime.getTime() - lastCommitTime.getTime()) / millisecondsPerHour ); if (elapsedHours >= config.prNotPendingHours) { - logger.info('Branch exceeds prNotPending hours - forcing PR creation'); + logger.debug('Branch exceeds prNotPending hours - forcing PR creation'); config.forcePr = true; } } @@ -304,7 +304,7 @@ export async function ensurePr( } // PR must need updating if (existingPr.title !== prTitle) { - logger.info( + logger.debug( { branchName, oldPrTitle: existingPr.title, @@ -327,10 +327,7 @@ export async function ensurePr( logger.info('DRY-RUN: Would update PR #' + existingPr.number); } else { await platform.updatePr(existingPr.number, prTitle, prBody); - logger.info( - { committedFiles: config.committedFiles, pr: existingPr.number }, - `PR updated` - ); + logger.info({ pr: existingPr.number, prTitle }, `PR updated`); } return existingPr; } @@ -362,7 +359,7 @@ export async function ensurePr( useDefaultBranch: false, platformOptions, }); - logger.info({ branch: branchName, pr: pr.number }, 'PR created'); + logger.info({ pr: pr.number, prTitle }, 'PR created'); } } catch (err) /* istanbul ignore next */ { logger.debug({ err }, 'Pull request creation error'); @@ -403,10 +400,10 @@ export async function ensurePr( if (config.branchAutomergeFailureMessage === 'branch status error') { content += '\n___\n * Branch has one or more failed status checks'; } - logger.info('Adding branch automerge failure message to PR'); + logger.debug('Adding branch automerge failure message to PR'); // istanbul ignore if if (config.dryRun) { - logger.info('Would add comment to PR #' + pr.number); + logger.info('DRY-RUN: Would add comment to PR #' + pr.number); } else { await platform.ensureComment({ number: pr.number, @@ -431,7 +428,7 @@ export async function ensurePr( } else { await addAssigneesReviewers(config, pr); } - logger.info(`Created ${pr.displayNumber}`); + logger.debug(`Created ${pr.displayNumber}`); return pr; } catch (err) { // istanbul ignore if @@ -466,12 +463,12 @@ export async function checkAutoMerge(pr: Pr, config): Promise<boolean> { logger.debug('PR is configured for automerge'); // Return if PR not ready for automerge if (pr.isConflicted) { - logger.info('PR is conflicted'); + logger.debug('PR is conflicted'); logger.debug({ pr }); return false; } if (requiredStatusChecks && pr.canMerge !== true) { - logger.info( + logger.debug( { canMergeReason: pr.canMergeReason }, 'PR is not ready for merge' ); @@ -482,18 +479,18 @@ export async function checkAutoMerge(pr: Pr, config): Promise<boolean> { requiredStatusChecks ); if (branchStatus !== BRANCH_STATUS_SUCCESS) { - logger.info( + logger.debug( `PR is not ready for merge (branch status is ${branchStatus})` ); return false; } // Check if it's been touched if (pr.isModified) { - logger.info('PR is ready for automerge but has been modified'); + logger.debug('PR is ready for automerge but has been modified'); return false; } if (automergeType === 'pr-comment') { - logger.info(`Applying automerge comment: ${automergeComment}`); + logger.debug(`Applying automerge comment: ${automergeComment}`); // istanbul ignore if if (config.dryRun) { logger.info( @@ -516,7 +513,7 @@ export async function checkAutoMerge(pr: Pr, config): Promise<boolean> { } const res = await platform.mergePr(pr.number, branchName); if (res) { - logger.info({ pr: pr.number }, 'PR automerged'); + logger.info({ pr: pr.number, prTitle: pr.title }, 'PR automerged'); } return res; } diff --git a/lib/workers/repository/error-config.ts b/lib/workers/repository/error-config.ts index 11277bc2778d9c6eef44836c0489e3bcc2882b1d..e556f5078345d4bdb27b3677993bf01aea729acf 100644 --- a/lib/workers/repository/error-config.ts +++ b/lib/workers/repository/error-config.ts @@ -17,7 +17,7 @@ export async function raiseConfigWarningIssue( } const pr = await platform.getBranchPr(config.onboardingBranch); if (pr && pr.state && pr.state.startsWith('open')) { - logger.info('Updating onboarding PR with config error notice'); + logger.debug('Updating onboarding PR with config error notice'); body = `## Action Required: Fix Renovate Configuration\n\n${body}`; body += `\n\nOnce you have resolved this problem (in this onboarding branch), Renovate will return to providing you with a preview of your repository's configuration.`; if (config.dryRun) { diff --git a/lib/workers/repository/extract/index.ts b/lib/workers/repository/extract/index.ts index ef50bab647515775de923cab7305d5f684a8b298..5baf4643b156fab819b83ca617d5318113a3d6b6 100644 --- a/lib/workers/repository/extract/index.ts +++ b/lib/workers/repository/extract/index.ts @@ -22,7 +22,7 @@ export async function extractAllDependencies( const packageFiles = await getManagerPackageFiles(managerConfig); if (packageFiles && packageFiles.length) { fileCount += packageFiles.length; - logger.info(`Found ${manager} package files`); + logger.debug(`Found ${manager} package files`); extractions[manager] = packageFiles; } } diff --git a/lib/workers/repository/extract/manager-files.ts b/lib/workers/repository/extract/manager-files.ts index 9c01a60578892db9643b584071a6137df5539e6b..be7910c5c966687bea29a46844365495081e1df3 100644 --- a/lib/workers/repository/extract/manager-files.ts +++ b/lib/workers/repository/extract/manager-files.ts @@ -67,7 +67,7 @@ export async function getManagerPackageFiles(config): Promise<PackageFile[]> { } } else { // istanbul ignore next - logger.info({ packageFile }, 'packageFile has no content'); + logger.debug({ packageFile }, 'packageFile has no content'); } } return packageFiles; diff --git a/lib/workers/repository/finalise/prune.ts b/lib/workers/repository/finalise/prune.ts index 7aff016bb6108c4de098b39f6cab6cf8b3952cd1..eb50c9e0d4b5e1dc597ca89a091fbbedfafd5b9e 100644 --- a/lib/workers/repository/finalise/prune.ts +++ b/lib/workers/repository/finalise/prune.ts @@ -29,9 +29,9 @@ async function cleanUpBranches( } } const closePr = true; - logger.info({ branch: branchName }, `Deleting orphan branch`); + logger.debug({ branch: branchName }, `Deleting orphan branch`); if (skipAutoclose) { - logger.info( + logger.debug( { prNo: pr.number, prTitle: pr.title }, 'Skip PR autoclosing' ); diff --git a/lib/workers/repository/finalise/validate.ts b/lib/workers/repository/finalise/validate.ts index 163a3c521d2f725276214e5b70f58a146f467fa7..7ce1441c9836e988b2e189c93dfecff22b03c397 100644 --- a/lib/workers/repository/finalise/validate.ts +++ b/lib/workers/repository/finalise/validate.ts @@ -40,7 +40,7 @@ export async function validatePrs(config: RenovateConfig): Promise<void> { if (!renovateFiles.length) { continue; // eslint-disable-line no-continue } - logger.info( + logger.debug( { prNo: pr.number, title: pr.title, renovateFiles }, 'PR has renovate files' ); @@ -111,7 +111,7 @@ export async function validatePrs(config: RenovateConfig): Promise<void> { } // istanbul ignore else if (pr.sourceRepo === config.repository) { - logger.info({ status, description }, 'Setting PR validation status'); + logger.debug({ status, description }, 'Setting PR validation status'); const context = `renovate/validate`; await platform.setBranchStatus({ branchName: pr.branchName, @@ -125,7 +125,7 @@ export async function validatePrs(config: RenovateConfig): Promise<void> { } catch (err) { // istanbul ignore if if (err.message === REPOSITORY_CHANGED) { - logger.info('Cannot access PR files to check them'); + logger.debug('Cannot access PR files to check them'); } else { logger.warn( { diff --git a/lib/workers/repository/index.ts b/lib/workers/repository/index.ts index 91fb726e14c7c6406b2f7a454746b37c20a5a031..6aaf8fe16fb6234d005e092039748beb762a2879 100644 --- a/lib/workers/repository/index.ts +++ b/lib/workers/repository/index.ts @@ -24,7 +24,7 @@ export async function renovateRepository( ): Promise<ProcessResult> { let config = { ...repoConfig }; setMeta({ repository: config.repository }); - logger.info({ renovateVersion }, 'Renovating repository'); + logger.info({ renovateVersion }, 'Repository started'); logger.trace({ config }); let repoResult: ProcessResult; try { @@ -49,6 +49,6 @@ export async function renovateRepository( if (config.localDir && !config.persistRepoData) { await fs.remove(config.localDir); } - logger.info('Finished repository'); + logger.info('Repository finished'); return repoResult; } diff --git a/lib/workers/repository/init/config.ts b/lib/workers/repository/init/config.ts index 755f7e48001ed81ebba07ebc1055a8f2119aa0b1..3086412e22dcb68b71e68cb9ddb7bbe1c6fa9f25 100644 --- a/lib/workers/repository/init/config.ts +++ b/lib/workers/repository/init/config.ts @@ -29,7 +29,7 @@ export async function mergeRenovateConfig( try { const pJson = JSON.parse(await platform.getFile('package.json')); if (pJson.renovate) { - logger.info('Using package.json for global renovate config'); + logger.debug('Using package.json for global renovate config'); return 'package.json'; } } catch (err) { @@ -51,7 +51,7 @@ export async function mergeRenovateConfig( if (configFile === 'package.json') { // We already know it parses renovateJson = JSON.parse(await platform.getFile('package.json')).renovate; - logger.info({ config: renovateJson }, 'package.json>renovate config'); + logger.debug({ config: renovateJson }, 'package.json>renovate config'); } else { let renovateConfig = await platform.getFile(configFile); // istanbul ignore if @@ -116,7 +116,7 @@ export async function mergeRenovateConfig( throw error; } } - logger.info({ configFile, config: renovateJson }, 'Repository config'); + logger.debug({ configFile, config: renovateJson }, 'Repository config'); } const migratedConfig = await migrateAndValidate(config, renovateJson); if (migratedConfig.errors.length) { @@ -161,7 +161,7 @@ export async function mergeRenovateConfig( } // istanbul ignore if if (resolvedConfig.hostRules) { - logger.info('Setting hostRules from config'); + logger.debug('Setting hostRules from config'); for (const rule of resolvedConfig.hostRules) { try { hostRules.add(rule); diff --git a/lib/workers/repository/init/flatten.ts b/lib/workers/repository/init/flatten.ts index fed4e685e41726ff588d6e1cbe285914efc39672..030a8c93c675f0e66d0241b860317df583d5dbcd 100644 --- a/lib/workers/repository/init/flatten.ts +++ b/lib/workers/repository/init/flatten.ts @@ -10,7 +10,7 @@ export function flattenPackageRules( } for (const rule of packageRules) { if (rule.packageRules && rule.packageRules.length) { - logger.info('Flattening nested packageRules'); + logger.debug('Flattening nested packageRules'); for (const subrule of rule.packageRules) { const combinedRule = mergeChildConfig(rule, subrule); delete combinedRule.packageRules; diff --git a/lib/workers/repository/init/index.ts b/lib/workers/repository/init/index.ts index 2f8d8dc970cbbd2b2f5026c28817f01bc5f73859..d347c6ea93bd49c372992df5e6b0fd859f6ca22b 100644 --- a/lib/workers/repository/init/index.ts +++ b/lib/workers/repository/init/index.ts @@ -28,7 +28,7 @@ export async function initRepo(input: RenovateConfig): Promise<RenovateConfig> { config = await detectVulnerabilityAlerts(config); // istanbul ignore if if (config.printConfig) { - logger.info({ config }, 'Full resolved config including presets'); + logger.debug({ config }, 'Full resolved config including presets'); } return config; } diff --git a/lib/workers/repository/init/vulnerability.ts b/lib/workers/repository/init/vulnerability.ts index dc9d0c651cdfcb35bb6309831d546d50f1909789..8969138a8117c808ffc9e7d052a466be96549d67 100644 --- a/lib/workers/repository/init/vulnerability.ts +++ b/lib/workers/repository/init/vulnerability.ts @@ -42,7 +42,7 @@ export async function detectVulnerabilityAlerts( continue; // eslint-disable-line no-continue } if (!alert.securityVulnerability.firstPatchedVersion) { - logger.info( + logger.debug( { alert }, 'Vulnerability alert has no firstPatchedVersion - skipping' ); @@ -106,7 +106,7 @@ export async function detectVulnerabilityAlerts( alert.vulnerableRequirements; } } else { - logger.info('Invalid firstPatchedVersion: ' + firstPatchedVersion); + logger.debug('Invalid firstPatchedVersion: ' + firstPatchedVersion); } } catch (err) { logger.warn({ err }, 'Error parsing vulnerability alert'); diff --git a/lib/workers/repository/master-issue.ts b/lib/workers/repository/master-issue.ts index e299813e8615e01dc62fb8ece7768e6aa929b16c..7d24177db09eef1b63de596728289096b0ddaed1 100644 --- a/lib/workers/repository/master-issue.ts +++ b/lib/workers/repository/master-issue.ts @@ -34,7 +34,7 @@ export async function ensureMasterIssue( ) { return; } - logger.info('Ensuring master issue'); + logger.debug('Ensuring master issue'); if ( !branches.length || branches.every(branch => branch.res === 'automerged') diff --git a/lib/workers/repository/onboarding/branch/check.ts b/lib/workers/repository/onboarding/branch/check.ts index ce6f8a3554e93b708d60a39fdfa80da4fd709205..0f420ea2e10dc8a6fdf4be2ac04da8bf53bada32 100644 --- a/lib/workers/repository/onboarding/branch/check.ts +++ b/lib/workers/repository/onboarding/branch/check.ts @@ -78,7 +78,7 @@ export const isOnboarded = async (config: RenovateConfig): Promise<boolean> => { logger.debug('Config not mandatory so repo is considered onboarded'); return true; } - logger.info('Repo is not onboarded and no merged PRs exist'); + logger.debug('Repo is not onboarded and no merged PRs exist'); if (!config.suppressNotifications.includes('onboardingClose')) { // ensure PR comment await platform.ensureComment({ diff --git a/lib/workers/repository/onboarding/branch/config.ts b/lib/workers/repository/onboarding/branch/config.ts index 3366477f47709723a2685c30c5ce6cd6c589a525..c9fffab019e153778aa588802ff6276b6e9cf348 100644 --- a/lib/workers/repository/onboarding/branch/config.ts +++ b/lib/workers/repository/onboarding/branch/config.ts @@ -18,20 +18,20 @@ export async function getOnboardingConfig( } const { label, branchName, ignore } = greenkeeperConfig; if (label) { - logger.info({ label }, 'Migrating Greenkeeper label'); + logger.debug({ label }, 'Migrating Greenkeeper label'); onboardingConfig.labels = [ String(label).replace('greenkeeper', 'renovate'), ]; } if (branchName) { - logger.info({ branch: branchName }, 'Migrating Greenkeeper branchName'); + logger.debug({ branch: branchName }, 'Migrating Greenkeeper branchName'); onboardingConfig.branchName = String(branchName).replace( 'greenkeeper', 'renovate' ); } if (is.nonEmptyArray(ignore)) { - logger.info({ ignore }, 'Migrating Greenkeeper ignore'); + logger.debug({ ignore }, 'Migrating Greenkeeper ignore'); onboardingConfig.ignoreDeps = ignore.map(String); } } catch (err) { diff --git a/lib/workers/repository/onboarding/branch/create.ts b/lib/workers/repository/onboarding/branch/create.ts index c5d2616506fabc45a04ff2b3b0694adbc610cd8b..19834ba0febb6780b3f2ed9426aaf46fc5681521 100644 --- a/lib/workers/repository/onboarding/branch/create.ts +++ b/lib/workers/repository/onboarding/branch/create.ts @@ -11,7 +11,7 @@ export async function createOnboardingBranch( ): Promise<string | null> { logger.debug('createOnboardingBranch()'); const contents = await getOnboardingConfig(config); - logger.info('Creating onboarding branch'); + logger.debug('Creating onboarding branch'); let commitMessage; // istanbul ignore if if (config.semanticCommits) { diff --git a/lib/workers/repository/onboarding/branch/index.ts b/lib/workers/repository/onboarding/branch/index.ts index b7307b06b06b9a0e9b4963d56c5abde4fe7a6fcd..c5d7b81490fb9c12f5b564a85b7882c2b2a4838b 100644 --- a/lib/workers/repository/onboarding/branch/index.ts +++ b/lib/workers/repository/onboarding/branch/index.ts @@ -23,7 +23,7 @@ export async function checkOnboardingBranch( if (config.isFork && !config.includeForks) { throw new Error(REPOSITORY_FORKED); } - logger.info('Repo is not onboarded'); + logger.debug('Repo is not onboarded'); if (await onboardingPrExists(config)) { logger.debug('Onboarding PR already exists'); const commit = await rebaseOnboardingBranch(config); @@ -38,7 +38,7 @@ export async function checkOnboardingBranch( if (Object.entries(await extractAllDependencies(config)).length === 0) { throw new Error(MANAGER_NO_PACKAGE_FILES); } - logger.info('Need to create onboarding PR'); + logger.debug('Need to create onboarding PR'); const commit = await createOnboardingBranch(config); if (commit) { logger.info( diff --git a/lib/workers/repository/onboarding/branch/rebase.ts b/lib/workers/repository/onboarding/branch/rebase.ts index 9ba102a906d987d18cfea31bf4dba696316b5605..b60b3919560d1bfbfc52261d62a40caba9239c7e 100644 --- a/lib/workers/repository/onboarding/branch/rebase.ts +++ b/lib/workers/repository/onboarding/branch/rebase.ts @@ -28,7 +28,7 @@ export async function rebaseOnboardingBranch( logger.debug('Checking if onboarding branch needs rebasing'); const pr = await platform.getBranchPr(config.onboardingBranch); if (pr.isModified) { - logger.info('Onboarding branch has been edited and cannot be rebased'); + logger.debug('Onboarding branch has been edited and cannot be rebased'); return null; } const existingContents = await platform.getFile( @@ -37,10 +37,10 @@ export async function rebaseOnboardingBranch( ); const contents = await getOnboardingConfig(config); if (contents === existingContents && !pr.isStale) { - logger.info('Onboarding branch is up to date'); + logger.debug('Onboarding branch is up to date'); return null; } - logger.info('Rebasing onboarding branch'); + logger.debug('Rebasing onboarding branch'); // istanbul ignore next const commitMessage = getCommitMessage(config); diff --git a/lib/workers/repository/onboarding/pr/errors-warnings.ts b/lib/workers/repository/onboarding/pr/errors-warnings.ts index 97711df907c6a4f51b04b84b48780f5ce543f896..cc029f32a7693a4f8d928852dd6c5ae24fd52d8c 100644 --- a/lib/workers/repository/onboarding/pr/errors-warnings.ts +++ b/lib/workers/repository/onboarding/pr/errors-warnings.ts @@ -56,7 +56,7 @@ export function getDepWarnings( if (!warnings.length) { return ''; } - logger.info( + logger.debug( { warnings, warningFiles }, 'Found package lookup warnings in onboarding' ); diff --git a/lib/workers/repository/onboarding/pr/index.ts b/lib/workers/repository/onboarding/pr/index.ts index 1d3238a844d0ae87acb18641fb505ef4844028cf..f9d59580e2f8665f16726c79316cdbe18b8e647d 100644 --- a/lib/workers/repository/onboarding/pr/index.ts +++ b/lib/workers/repository/onboarding/pr/index.ts @@ -99,20 +99,20 @@ If you need any further assistance then you can also [request help here](${confi prBody = platform.getPrBody(prBody); if (existingPr) { - logger.info('Found open onboarding PR'); + logger.debug('Found open onboarding PR'); // Check if existing PR needs updating if ( existingPr.body.trim() === prBody.trim() // Bitbucket strips trailing \n ) { - logger.info(`${existingPr.displayNumber} does not need updating`); + logger.debug(`${existingPr.displayNumber} does not need updating`); return; } // PR must need updating await platform.updatePr(existingPr.number, existingPr.title, prBody); - logger.info(`Updated ${existingPr.displayNumber}`); + logger.info({ pr: existingPr.number }, 'Onboarding PR updated'); return; } - logger.info('Creating onboarding PR'); + logger.debug('Creating onboarding PR'); const labels = []; const useDefaultBranch = true; try { @@ -127,7 +127,7 @@ If you need any further assistance then you can also [request help here](${confi labels, useDefaultBranch, }); - logger.info({ pr: pr.displayNumber }, 'Created onboarding PR'); + logger.info({ pr: pr.displayNumber }, 'Onboarding PR created'); } } catch (err) /* istanbul ignore next */ { if ( @@ -140,7 +140,7 @@ If you need any further assistance then you can also [request help here](${confi 'A pull request already exists' ) ) { - logger.info('Onboarding PR already exists but cannot find it'); + logger.debug('Onboarding PR already exists but cannot find it'); await platform.deleteBranch(config.onboardingBranch); return; } diff --git a/lib/workers/repository/process/deprecated.ts b/lib/workers/repository/process/deprecated.ts index 1122d81de0fb9aa7a16182b9675d51afbd5aa39d..40843211b5610d94af56494b1fe63d815e1175b0 100644 --- a/lib/workers/repository/process/deprecated.ts +++ b/lib/workers/repository/process/deprecated.ts @@ -41,7 +41,7 @@ export async function raiseDeprecationWarnings( const issueTitlePrefix = 'Dependency deprecation warning:'; for (const [depName, val] of Object.entries(deprecatedPackages)) { const { deprecationMessage, depPackageFiles } = val; - logger.info( + logger.debug( { depName, deprecationMessage, diff --git a/lib/workers/repository/process/index.ts b/lib/workers/repository/process/index.ts index 873b64a8362b129ea241987e00ad62a7d1904e50..c187f32d487f32bf295e82eff1bd614dedebe310 100644 --- a/lib/workers/repository/process/index.ts +++ b/lib/workers/repository/process/index.ts @@ -44,7 +44,7 @@ export async function processRepo( } } if (config.baseBranches && config.baseBranches.length) { - logger.info({ baseBranches: config.baseBranches }, 'baseBranches'); + logger.debug({ baseBranches: config.baseBranches }, 'baseBranches'); let res: WriteUpdateResult | undefined; let branches: BranchConfig[] = []; let branchList: string[] = []; diff --git a/lib/workers/repository/process/lookup/index.ts b/lib/workers/repository/process/lookup/index.ts index be54c177d81568cfa162b49d66b9ba07a05f4f7f..a9740324cc14ec939ab8b17b3dadbb85a5312c47 100644 --- a/lib/workers/repository/process/lookup/index.ts +++ b/lib/workers/repository/process/lookup/index.ts @@ -144,7 +144,7 @@ export async function lookupUpdates( updateType: 'warning', message: `Failed to look up dependency ${depName}`, }; - logger.info( + logger.debug( { dependency: depName, packageFile: config.packageFile }, result.message ); @@ -153,7 +153,7 @@ export async function lookupUpdates( return res; } if (dependency.deprecationMessage) { - logger.info({ dependency: depName }, 'Found deprecationMessage'); + logger.debug({ dependency: depName }, 'Found deprecationMessage'); res.deprecationMessage = dependency.deprecationMessage; } res.sourceUrl = @@ -392,7 +392,7 @@ export async function lookupUpdates( .replace('sha256:', '') .substring(0, 7); } else { - logger.info({ newValue: update.newValue }, 'Could not getDigest'); + logger.debug({ newValue: update.newValue }, 'Could not getDigest'); } } } diff --git a/lib/workers/repository/process/lookup/rollback.ts b/lib/workers/repository/process/lookup/rollback.ts index d8c313858830966fe92ea699d9a9dca7e3f32a12..53cc2d2f13aca6961a4cea0af652ab2f91951e9c 100644 --- a/lib/workers/repository/process/lookup/rollback.ts +++ b/lib/workers/repository/process/lookup/rollback.ts @@ -17,7 +17,7 @@ export function getRollbackUpdate( const version = allVersioning.get(versioning); // istanbul ignore if if (!('isLessThanRange' in version)) { - logger.info( + logger.debug( { versioning }, 'Current versioning does not support isLessThanRange()' ); @@ -28,13 +28,13 @@ export function getRollbackUpdate( ); // istanbul ignore if if (!lessThanVersions.length) { - logger.info( + logger.debug( { packageFile, depName, currentValue }, 'Missing version has nothing to roll back to' ); return null; } - logger.info( + logger.debug( { packageFile, depName, currentValue }, `Current version not found - rolling back` ); @@ -46,7 +46,7 @@ export function getRollbackUpdate( const toVersion = lessThanVersions.pop(); // istanbul ignore if if (!toVersion) { - logger.info('No toVersion to roll back to'); + logger.debug('No toVersion to roll back to'); return null; } const newValue = version.getNewValue({ diff --git a/lib/workers/repository/process/write.ts b/lib/workers/repository/process/write.ts index 368d0fe719fbe0b39b4378c1b1c26413d3974ca3..48a6d7e971ef3aab44eff76425fbe6f95b4bb04f 100644 --- a/lib/workers/repository/process/write.ts +++ b/lib/workers/repository/process/write.ts @@ -15,7 +15,7 @@ export async function writeUpdates( allBranches: BranchConfig[] ): Promise<WriteUpdateResult> { let branches = allBranches; - logger.info( + logger.debug( `Processing ${branches.length} branch${ branches.length !== 1 ? 'es' : '' }: ${branches diff --git a/lib/workers/repository/updates/branchify.ts b/lib/workers/repository/updates/branchify.ts index 93ea6c5b94cf90f7f0d535ed4b1f4a25c9d42f59..7c48a49fb08effc1c252295b911185666c27d1bf 100644 --- a/lib/workers/repository/updates/branchify.ts +++ b/lib/workers/repository/updates/branchify.ts @@ -119,14 +119,14 @@ export function branchifyUpgrades( for (const [key, value] of Object.entries(branchUpdates)) { if (Object.keys(value).length > 1) { const [sourceUrl, toVersion] = key.split('|'); - logger.info( + logger.debug( { sourceUrl, toVersion, branches: value }, 'Found sourceUrl with multiple branches that should probably be combined into a group' ); } } } catch (err) { - logger.info({ err }, 'Error checking branch duplicates'); + logger.debug({ err }, 'Error checking branch duplicates'); } return { errors: config.errors.concat(errors), diff --git a/lib/workers/repository/updates/generate.ts b/lib/workers/repository/updates/generate.ts index 175a1ef754be13e06d9dfe571b827c9c186d9d8d..0f1e7bfaafcd751ea8b3b9d124baeb1964c823a8 100644 --- a/lib/workers/repository/updates/generate.ts +++ b/lib/workers/repository/updates/generate.ts @@ -142,7 +142,7 @@ export function generateBranchConfig(branchUpgrades): RenovateConfig { upgrade.updateType !== 'lockFileMaintenance' && upgrade.displayFrom.length * upgrade.displayTo.length === 0 ) { - logger.info({ config: upgrade }, 'empty displayFrom/displayTo'); + logger.debug({ config: upgrade }, 'empty displayFrom/displayTo'); } if (upgrade.depName) { upgrade.depNameEscaped = (upgrade.lookupName || upgrade.depName).replace(