diff --git a/src/main/java/argelbargel/jenkins/plugins/gitlab_branch_source/actions/GitLabSCMBuildStatusPublisher.java b/src/main/java/argelbargel/jenkins/plugins/gitlab_branch_source/actions/GitLabSCMBuildStatusPublisher.java index bebf18a..a5e16ec 100644 --- a/src/main/java/argelbargel/jenkins/plugins/gitlab_branch_source/actions/GitLabSCMBuildStatusPublisher.java +++ b/src/main/java/argelbargel/jenkins/plugins/gitlab_branch_source/actions/GitLabSCMBuildStatusPublisher.java @@ -13,6 +13,7 @@ import java.util.concurrent.TimeUnit; import java.util.logging.Logger; +import static java.util.logging.Level.FINE; import static java.util.logging.Level.SEVERE; import static java.util.logging.Level.WARNING; @@ -91,6 +92,9 @@ public void run() { LOGGER.log(WARNING, "cannot publish build-status pending as no gitlab-connection is configured!"); } else { try { + if (LOGGER.isLoggable(FINE)) { + LOGGER.log(FINE, "setting build-status of '" + context + "' for project " + projectId + " to " + state + "..."); + } client.changeBuildStatus(projectId, hash, state, ref, context, Jenkins.getInstance().getRootUrl() + run.getUrl(), description); } catch (Exception e) { LOGGER.log(SEVERE, "failed to set build-status of '" + context + "' for project " + projectId + " to " + state, e); @@ -103,4 +107,4 @@ private GitLabApi getClient(String connectionName) { return config != null ? config.getClient(connectionName) : null; } } -} +} \ No newline at end of file