|
|||||||||
| Home >> All >> com >> mycompany >> [ listeners overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.mycompany.listeners
Class MailLogger

java.lang.Objectcom.mycompany.listeners.MailLogger
- All Implemented Interfaces:
- com.puppycrawl.tools.checkstyle.api.AuditListener, java.util.EventListener
- public class MailLogger
- extends java.lang.Object
- implements com.puppycrawl.tools.checkstyle.api.AuditListener
- extends java.lang.Object
Buffers log messages from DefaultLogger, and sends an e-mail with the results. The following Project properties are used to send the mail.
- MailLogger.mailhost [default: localhost] - Mail server to use
- MailLogger.from [required] - Mail "from" address
- MailLlistener.failure.notify [default: true] - Send build failure e-mails?
- MailLogger.success.notify [default: true] - Send build success e-mails?
- MailLogger.failure.to [required if failure mail to be sent] - Address to send failure messages to
- MailLogger.success.to [required if success mail to be sent] - Address to send success messages to
- MailLogger.failure.subject [default: "Build Failure"] - Subject of failed build
- MailLlistener.success.subject [default: "Build Success"] - Subject of successful build
| Field Summary | |
private int |
mErrors
count of the number of errors and exceptions |
private com.puppycrawl.tools.checkstyle.DefaultLogger |
mLogger
adapted listener |
private java.io.ByteArrayOutputStream |
mOutputStream
output stream for logger |
| Constructor Summary | |
MailLogger()
Constructs a MailLogger |
|
| Method Summary | |
void |
addError(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)
Notify that an audit error was discovered on a specific file. |
void |
addException(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt,
java.lang.Throwable aThrowable)
Notify that an exception happened while performing audit. |
void |
auditFinished(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)
Sends an e-mail with the log results. |
void |
auditStarted(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)
Notify that the audit is about to start. |
void |
fileFinished(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)
Notify that audit is finished on a specific file. |
void |
fileStarted(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)
Notify that audit is about to start on a specific file. |
private java.lang.String |
getValue(java.util.Properties aProperties,
java.lang.String aName,
java.lang.String aDefaultValue)
Gets the value of a property. |
private void |
sendMail(java.lang.String aMailhost,
java.lang.String aFrom,
java.lang.String aToList,
java.lang.String aSubject,
java.lang.String aText)
Send the mail |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
mOutputStream
private java.io.ByteArrayOutputStream mOutputStream
- output stream for logger
mLogger
private com.puppycrawl.tools.checkstyle.DefaultLogger mLogger
- adapted listener
mErrors
private int mErrors
- count of the number of errors and exceptions
| Constructor Detail |
MailLogger
public MailLogger()
- Constructs a
MailLogger
| Method Detail |
auditStarted
public void auditStarted(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)
- Description copied from interface:
com.puppycrawl.tools.checkstyle.api.AuditListener - Notify that the audit is about to start.
- Specified by:
auditStartedin interfacecom.puppycrawl.tools.checkstyle.api.AuditListener
auditFinished
public void auditFinished(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)
- Sends an e-mail with the log results.
- Specified by:
auditFinishedin interfacecom.puppycrawl.tools.checkstyle.api.AuditListener
fileStarted
public void fileStarted(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)
- Description copied from interface:
com.puppycrawl.tools.checkstyle.api.AuditListener - Notify that audit is about to start on a specific file.
- Specified by:
fileStartedin interfacecom.puppycrawl.tools.checkstyle.api.AuditListener
fileFinished
public void fileFinished(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)
- Description copied from interface:
com.puppycrawl.tools.checkstyle.api.AuditListener - Notify that audit is finished on a specific file.
- Specified by:
fileFinishedin interfacecom.puppycrawl.tools.checkstyle.api.AuditListener
addError
public void addError(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt)
- Description copied from interface:
com.puppycrawl.tools.checkstyle.api.AuditListener - Notify that an audit error was discovered on a specific file.
- Specified by:
addErrorin interfacecom.puppycrawl.tools.checkstyle.api.AuditListener
addException
public void addException(com.puppycrawl.tools.checkstyle.api.AuditEvent aEvt, java.lang.Throwable aThrowable)
- Description copied from interface:
com.puppycrawl.tools.checkstyle.api.AuditListener - Notify that an exception happened while performing audit.
- Specified by:
addExceptionin interfacecom.puppycrawl.tools.checkstyle.api.AuditListener
getValue
private java.lang.String getValue(java.util.Properties aProperties, java.lang.String aName, java.lang.String aDefaultValue) throws com.puppycrawl.tools.checkstyle.api.CheckstyleException
- Gets the value of a property.
sendMail
private void sendMail(java.lang.String aMailhost, java.lang.String aFrom, java.lang.String aToList, java.lang.String aSubject, java.lang.String aText) throws java.lang.Exception
- Send the mail
|
|||||||||
| Home >> All >> com >> mycompany >> [ listeners overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
com.mycompany.listeners.MailLogger