Skip to content
Permalink
Browse files

[FIXED JENKINS-27392] Handling ConsoleLogFilter.

Originally-Committed-As: 38cd1ea642bd45e45331e89c8cef7ffb8e3740fa
  • Loading branch information
jglick committed Mar 30, 2015
1 parent b304848 commit e3bea833905716718ed37ef55c5eb5298c21ec3f
@@ -26,6 +26,7 @@

import hudson.EnvVars;
import hudson.Launcher;
import hudson.console.ConsoleLogFilter;
import hudson.model.Computer;
import hudson.model.Job;
import hudson.model.Node;
@@ -34,6 +35,7 @@
import hudson.util.StreamTaskListener;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.charset.Charset;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -88,8 +90,12 @@
la = new LogActionImpl(getNode(), Charset.defaultCharset());
getNode().addAction(la);
}

listener = new StreamTaskListener(new FileOutputStream(la.getLogFile(), true));
ConsoleLogFilter filter = get(ConsoleLogFilter.class);
OutputStream os = new FileOutputStream(la.getLogFile(), true);
if (filter != null) {
os = filter.decorateLogger(null, os);
}
listener = new StreamTaskListener(os);
getExecution().addListener(new GraphListener() {
@Override public void onNewHead(FlowNode node) {
try {

0 comments on commit e3bea83

Please sign in to comment.
You can’t perform that action at this time.