Skip to content

Commit 777f9cc

Browse files
authored
Merge pull request #1329 from MarkEWaite/reduce-logging-at-INFO-level
[JENKINS-69613] Reduce log output at INFO level
2 parents af5300b + 4446c32 commit 777f9cc

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/main/java/hudson/plugins/git/GitStatus.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,9 @@ public List<ResponseContributor> onNotifyCommit(String origin, URIish uri, Strin
390390

391391
SCMTrigger trigger = scmTriggerItem.getSCMTrigger();
392392
if (trigger == null || trigger.isIgnorePostCommitHooks()) {
393-
LOGGER.log(Level.INFO, "no trigger, or post-commit hooks disabled, on {0}", project.getFullDisplayName());
393+
if (LOGGER.isLoggable(Level.FINE)) {
394+
LOGGER.log(Level.FINE, "no trigger, or post-commit hooks disabled, on {0}", project.getFullDisplayName());
395+
}
394396
continue;
395397
}
396398

@@ -456,7 +458,9 @@ public List<ResponseContributor> onNotifyCommit(String origin, URIish uri, Strin
456458
* NOTE: This is not scheduling the build, just polling for changes
457459
* If the polling detects changes, it will schedule the build
458460
*/
459-
LOGGER.log(Level.INFO, "Triggering the polling of {0}", project.getFullDisplayName());
461+
if (LOGGER.isLoggable(Level.FINE)) {
462+
LOGGER.log(Level.FINE, "Triggering the polling of {0}", project.getFullDisplayName());
463+
}
460464
trigger.run();
461465
result.add(new PollingScheduledResponseContributor(project));
462466
break SCMS; // no need to trigger the same project twice, so do not consider other GitSCMs in it

src/main/java/jenkins/plugins/git/GitSCMSource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ public boolean isMatch(@NonNull SCM scm) {
646646
continue;
647647
}
648648
if (GitStatus.looselyMatches(uri, remote)) {
649-
LOGGER.info("Triggering the indexing of " + owner.getFullDisplayName()
649+
LOGGER.fine("Triggering the indexing of " + owner.getFullDisplayName()
650650
+ " as a result of event from " + origin);
651651
triggerIndexing(owner, source);
652652
result.add(new GitStatus.ResponseContributor() {

0 commit comments

Comments
 (0)