提交 3ef8063e 编写于 作者: J Jesse Glick

[JENKINS-22395] Yet more diagnostics.

上级 c1fcb08e
......@@ -435,7 +435,7 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
// result can only get worse
if (result==null || r.isWorseThan(result)) {
result = r;
LOGGER.log(FINE, this + " : result is set to " + r, LOGGER.isLoggable(Level.FINER) ? new Exception() : null);
LOGGER.log(FINE, this + " in " + getRootDir() + ": result is set to " + r, LOGGER.isLoggable(Level.FINER) ? new Exception() : null);
}
}
......@@ -1451,7 +1451,7 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
public void delete() throws IOException {
File rootDir = getRootDir();
if (!rootDir.isDirectory()) {
throw new IOException(this + ": " + rootDir + " looks to have already been deleted");
throw new IOException(this + ": " + rootDir + " looks to have already been deleted; siblings: " + Arrays.toString(project.getBuildDir().list()));
}
RunListener.fireDeleted(this);
......
......@@ -108,7 +108,7 @@ public class LogRotator extends BuildDiscarder {
@SuppressWarnings("rawtypes")
public void perform(Job<?,?> 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();
......
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册