diff --git a/core/src/main/java/hudson/model/Run.java b/core/src/main/java/hudson/model/Run.java index d2701f5d66..d4ac8e5384 100644 --- a/core/src/main/java/hudson/model/Run.java +++ b/core/src/main/java/hudson/model/Run.java @@ -435,7 +435,7 @@ public abstract class Run ,RunT extends Run,RunT extends Run job) throws IOException, InterruptedException { - LOGGER.log(FINE, "Running the log rotation for {0}", job); + LOGGER.log(FINE, "Running the log rotation for {0} with numToKeep={1} daysToKeep={2} artifactNumToKeep={3} artifactDaysToKeep={4}", new Object[] {job, numToKeep, daysToKeep, artifactNumToKeep, artifactDaysToKeep}); // always keep the last successful and the last stable builds Run lsb = job.getLastSuccessfulBuild(); diff --git a/core/src/main/java/jenkins/model/StandardArtifactManager.java b/core/src/main/java/jenkins/model/StandardArtifactManager.java index 1716158e21..a4f8b9df8d 100644 --- a/core/src/main/java/jenkins/model/StandardArtifactManager.java +++ b/core/src/main/java/jenkins/model/StandardArtifactManager.java @@ -32,6 +32,8 @@ import hudson.model.Run; import java.io.File; import java.io.IOException; import java.util.Map; +import java.util.logging.Level; +import java.util.logging.Logger; import jenkins.util.VirtualFile; /** @@ -41,6 +43,8 @@ import jenkins.util.VirtualFile; */ public class StandardArtifactManager extends ArtifactManager { + private static final Logger LOG = Logger.getLogger(StandardArtifactManager.class.getName()); + protected transient Run build; public StandardArtifactManager(Run build) { @@ -60,8 +64,10 @@ public class StandardArtifactManager extends ArtifactManager { @Override public final boolean delete() throws IOException, InterruptedException { File ad = getArtifactsDir(); if (!ad.exists()) { + LOG.log(Level.FINE, "no such directory {0} to delete for {1}", new Object[] {ad, build}); return false; } + LOG.log(Level.FINE, "deleting {0} for {1}", new Object[] {ad, build}); Util.deleteRecursive(ad); return true; }