mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-18 06:22:29 +00:00
[JENKINS-22395] Yet more diagnostics.
This commit is contained in:
1 parent
c1fcb08e08
commit
3ef8063e43
3 files changed
+9
-3
No files matched your search
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user