forked from nickgrealy/poll-mailbox-trigger
-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed issue with build parameters not being correctly set. Fixes #19
- Loading branch information
1 parent
b9b0cd6
commit d9f0ea0
Showing
5 changed files
with
129 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
src/main/groovy/org/jenkinsci/plugins/pollmailboxtrigger/TeeLogger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package org.jenkinsci.plugins.pollmailboxtrigger; | ||
|
||
import org.jenkinsci.lib.xtrigger.XTriggerLog; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* I pity the fool, who tries to log to two places... | ||
* <b>See also:</b> <a href="https://en.wikipedia.org/wiki/Tee_(command)">https://en.wikipedia.org/wiki/Tee_(command)</a> | ||
*/ | ||
public class TeeLogger { | ||
|
||
private XTriggerLog log; | ||
private List<String> testing; | ||
|
||
public TeeLogger(final XTriggerLog log, final List<String> testing) { | ||
this.log = log; | ||
this.testing = testing; | ||
} | ||
|
||
public void info(final String message) { | ||
log.info(message); | ||
testing.add(message); | ||
} | ||
|
||
public void error(final String message) { | ||
log.error(message); | ||
testing.add(message); | ||
} | ||
|
||
public XTriggerLog getLog() { | ||
return log; | ||
} | ||
|
||
public List<String> getTesting() { | ||
return testing; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters