提交 df67c096 编写于 作者: K kohsuke

added debug probes.


git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@3809 71c3de6d-444a-0410-be80-ed276b4c234a
上级 50919396
......@@ -243,11 +243,19 @@ public class MailSender<P extends AbstractProject<P, B>, B extends AbstractBuild
while (tokens.hasMoreTokens())
rcp.add(new InternetAddress(tokens.nextToken()));
if (sendToIndividuals) {
if(debug) {
int count = 0;
for (Entry cs : build.getChangeSet()) count++;
listener.getLogger().println("Trying to send e-mails to individuals who broke the build. sizeof(changeset)=="+count);
}
Set<User> users = new HashSet<User>();
for (Entry change : build.getChangeSet()) {
User a = change.getAuthor();
if (users.add(a)) {
String adrs = a.getProperty(Mailer.UserProperty.class).getAddress();
if(debug)
listener.getLogger().println(" User "+a.getId()+" -> "+adrs);
if (adrs != null)
rcp.add(new InternetAddress(adrs));
else {
......@@ -295,5 +303,7 @@ public class MailSender<P extends AbstractProject<P, B>, B extends AbstractBuild
private static final Logger LOGGER = Logger.getLogger(MailSender.class.getName());
public static boolean debug = false;
private static final int MAX_LOG_LINES = 250;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册