Class JenkinsLogWatcher
java.lang.Object
org.jenkinsci.test.acceptance.controller.JenkinsLogWatcher
- All Implemented Interfaces:
Closeable
,AutoCloseable
,LogListenable
LogWatcher
for monitoring output from Jenkins- Author:
- Kohsuke Kawaguchi
-
Field Summary
-
Constructor Summary
ConstructorDescriptionJenkinsLogWatcher
(String id, InputStream pipe, File logFile, LogListener printer) -
Method Summary
-
Field Details
-
ready
Signals when Jenkins is ready for action. -
portConflict
Signals when there's a port conflict, which is a common error. -
logFile
-
reader
Thread that reads log output from Jenkins.
-
-
Constructor Details
-
JenkinsLogWatcher
public JenkinsLogWatcher(String id, InputStream pipe, File logFile, LogListener printer) throws FileNotFoundException - Parameters:
id
- Short ID that indicates the log that we are watching.printer
- The printer to use to write the Jenkins logging statements to- Throws:
FileNotFoundException
-
-
Method Details
-
start
public void start()Starts scanning logs. -
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Throws:
IOException
-
waitTillReady
public void waitTillReady()Block until Jenkins is up and running -
addLogListener
- Specified by:
addLogListener
in interfaceLogListenable
-
removeLogListener
- Specified by:
removeLogListener
in interfaceLogListenable
-